Przeglądaj źródła

Updated output to use jobPrefix as well as the describe command to show the job prefix.

Matt Daum 11 lat temu
rodzic
commit
2493dddcb6

+ 1 - 1
Command/GearmanWorkerListCommand.php

@@ -63,7 +63,7 @@ class GearmanWorkerListCommand extends ContainerAwareCommand
 
 
                     if (false === is_null($job['jobPrefix'])) {
                     if (false === is_null($job['jobPrefix'])) {
 
 
-                        $output->writeln('<comment>          job prefix:</comment><info> '.$job['jobPrefix'].'</info>');
+                        $output->writeln('<comment>          jobPrefix:</comment><info> '.$job['jobPrefix'].'</info>');
                     }
                     }
                 }
                 }
                 $output->writeln('');
                 $output->writeln('');

+ 6 - 1
Service/GearmanDescriber.php

@@ -62,6 +62,11 @@ class GearmanDescriber
         $output->writeln('<info>    @job\methodName : ' . $job['methodName'] . '</info>');
         $output->writeln('<info>    @job\methodName : ' . $job['methodName'] . '</info>');
         $output->writeln('<info>    @job\callableName : ' . $job['realCallableName'] . '</info>');
         $output->writeln('<info>    @job\callableName : ' . $job['realCallableName'] . '</info>');
 
 
+        if(false === is_null($job['jobPrefix'])){
+            $output->writeln('<info>    @job\jobPrefix : ' . $job['jobPrefix'] . '</info>');
+        }
+
+
         /**
         /**
          * Also a complete and clean execution path is given , for supervisord
          * Also a complete and clean execution path is given , for supervisord
          */
          */
@@ -133,7 +138,7 @@ class GearmanDescriber
 
 
                 if ($job['jobPrefix']) {
                 if ($job['jobPrefix']) {
 
 
-                    $output->writeln('<comment>        # ' . $job['realCallableNameNoPrefix'] . ' with prefix: ' . $job['jobPrefix'] . '</comment>');
+                    $output->writeln('<comment>        # ' . $job['realCallableNameNoPrefix'] . ' with jobPrefix: ' . $job['jobPrefix'] . '</comment>');
                 } else {
                 } else {
 
 
                     $output->writeln('<comment>        # ' . $job['realCallableNameNoPrefix'] . ' </comment>');
                     $output->writeln('<comment>        # ' . $job['realCallableNameNoPrefix'] . ' </comment>');