@@ -520,16 +520,27 @@ private function snapshotForConfiguredNamespace(): array
520520 self ::invokeLegacyHealthCheck ('historyRetentionInvariantCheck ' , $ metrics ['history ' ] ?? []),
521521 self ::invokeLegacyHealthCheck ('commandContractCheck ' , $ metrics ['command_contracts ' ] ?? []),
522522 self ::invokeLegacyHealthCheck ('taskTransportCheck ' , $ metrics ['tasks ' ] ?? [], $ metrics ['backlog ' ] ?? []),
523- self ::invokeLegacyHealthCheck (
524- 'durableResumePathCheck ' ,
525- $ metrics ['backlog ' ] ?? [],
526- $ metrics ['repair ' ] ?? [],
527- $ metrics ['runs ' ] ?? [],
528- ),
529- self ::invokeLegacyHealthCheck ('workerCompatibilityCheck ' , $ metrics ['workers ' ] ?? []),
530- self ::invokeLegacyHealthCheck ('schedulerRoleCheck ' , $ metrics ['schedules ' ] ?? []),
531- self ::invokeLegacyHealthCheck ('longPollWakeAccelerationCheck ' ),
532523 ];
524+
525+ if (self ::legacyHealthCheckExists ('routingHealthCheck ' )) {
526+ $ checks [] = self ::invokeLegacyHealthCheck (
527+ 'routingHealthCheck ' ,
528+ $ metrics ['tasks ' ] ?? [],
529+ $ metrics ['backlog ' ] ?? [],
530+ $ metrics ['matching_role ' ] ?? [],
531+ $ metrics ['workers ' ] ?? [],
532+ );
533+ }
534+
535+ $ checks [] = self ::invokeLegacyHealthCheck (
536+ 'durableResumePathCheck ' ,
537+ $ metrics ['backlog ' ] ?? [],
538+ $ metrics ['repair ' ] ?? [],
539+ $ metrics ['runs ' ] ?? [],
540+ );
541+ $ checks [] = self ::invokeLegacyHealthCheck ('workerCompatibilityCheck ' , $ metrics ['workers ' ] ?? []);
542+ $ checks [] = self ::invokeLegacyHealthCheck ('schedulerRoleCheck ' , $ metrics ['schedules ' ] ?? []);
543+ $ checks [] = self ::invokeLegacyHealthCheck ('longPollWakeAccelerationCheck ' );
533544 $ status = self ::invokeLegacyHealthCheck ('status ' , $ checks );
534545
535546 return [
@@ -552,6 +563,11 @@ private static function invokeLegacyHealthCheck(string $method, mixed ...$args):
552563 )($ method , $ args );
553564 }
554565
566+ private static function legacyHealthCheckExists (string $ method ): bool
567+ {
568+ return method_exists (HealthCheck::class, $ method );
569+ }
570+
555571 /**
556572 * @return array<string, mixed>
557573 */
0 commit comments