@@ -56,7 +56,7 @@ class Worker
5656 private $ timeToRestart = null ;
5757
5858 /**
59- * @var int number of jobs remainig to process (once it reaches zero, the worker terminates so it can be restarted)
59+ * @var int number of jobs remaining to process (once it reaches zero, the worker terminates so it can be restarted)
6060 */
6161 private $ jobsRemaining = 1 ;
6262
@@ -93,7 +93,7 @@ public function __construct(array $config, Dispatcher $dispatcher, AsyncJobs $as
9393
9494 $ this ->quiet = (bool )Arrays::get ($ config , "quiet " , false );
9595
96- // setup signal handling (try to terminate gracefuly on these signals)
96+ // setup signal handling (try to terminate gracefully on these signals)
9797 if (function_exists ('pcntl_async_signals ' ) && function_exists ('pcntl_signal ' )) {
9898 pcntl_async_signals (true );
9999 pcntl_signal (SIGINT , [$ this , 'terminate ' ]);
@@ -112,7 +112,7 @@ public function terminate(): void
112112
113113 /**
114114 * Test whether the worker shall process jobs further, or whether it should go for restart.
115- * @return bool true if it shoud continue
115+ * @return bool true if it should continue
116116 */
117117 private function shallContinue (): bool
118118 {
@@ -195,7 +195,7 @@ private function dispatchJob(AsyncJob $job)
195195 );
196196 }
197197
198- // we need to relaod the job since the dispatcher might cleared the caches...
198+ // we need to reload the job since the dispatcher might cleared the caches...
199199 $ jobReloaded = $ this ->asyncJobs ->get ($ id );
200200 if ($ jobReloaded ) {
201201 if ($ error ) {
@@ -209,12 +209,12 @@ private function dispatchJob(AsyncJob $job)
209209
210210 /**
211211 * Main method of the worker that actually processes the async job.
212- * This method is blockinig , once it terminates the worker process should also terminate.
212+ * This method is blocking , once it terminates the worker process should also terminate.
213213 * @param string $workerId identifier of the worker (should be gathered from the CLI arguments)
214214 */
215215 public function run (string $ workerId )
216216 {
217- $ this ->notify ->init (); // start listeining for notifications
217+ $ this ->notify ->init (); // start listening for notifications
218218
219219 while ($ this ->shallContinue ()) { // just a precaution so the worker will not run forever
220220 // allocate and mark the best suitable job (null = none available)
0 commit comments