Browse Source

Merge pull request #105 from DZunke/master

--quiet should work for worker execution
Marc Morera 11 years ago
parent
commit
e9adf8b01d
1 changed files with 9 additions and 4 deletions
  1. 9 4
      Command/GearmanWorkerExecuteCommand.php

+ 9 - 4
Command/GearmanWorkerExecuteCommand.php

@@ -54,17 +54,22 @@ class GearmanWorkerExecuteCommand extends ContainerAwareCommand
             return;
             return;
         }
         }
 
 
-        $output->writeln(sprintf('<info>[%s] loading...</info>', date('Y-m-d H:i:s')));
+        if (!$input->getOption('quiet')) {
+            $output->writeln(sprintf('<info>[%s] loading...</info>', date('Y-m-d H:i:s')));
+        }
+
 
 
         $worker = $input->getArgument('worker');
         $worker = $input->getArgument('worker');
         $workerStruct = $this->getContainer()->get('gearman')->getWorker($worker);
         $workerStruct = $this->getContainer()->get('gearman')->getWorker($worker);
 
 
-        if (!$input->getOption('no-description')) {
-
+        if (!$input->getOption('no-description') && !$input->getOption('quiet')) {
             $this->getContainer()->get('gearman.describer')->describeWorker($output, $workerStruct, true);
             $this->getContainer()->get('gearman.describer')->describeWorker($output, $workerStruct, true);
         }
         }
 
 
-        $output->writeln(sprintf('<info>[%s] loaded. Ctrl+C to break</info>', date('Y-m-d H:i:s')));
+        if (!$input->getOption('quiet')) {
+            $output->writeln(sprintf('<info>[%s] loaded. Ctrl+C to break</info>', date('Y-m-d H:i:s')));
+        }
+
         $this->getContainer()->get('gearman.execute')->executeWorker($worker);
         $this->getContainer()->get('gearman.execute')->executeWorker($worker);
     }
     }
 }
 }