File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ protected function waitAll()
126126 if ($ id !== false ) {
127127 unset(static ::$ workers [$ id ]);
128128 }
129- $ this ->log ("[worker $ pid] exited with status $ status " );
129+ $ this ->log ("[worker. $ id $ pid] exited with status $ status " );
130130 }
131131 }
132132
@@ -150,15 +150,15 @@ protected function run()
150150 // Run job.
151151 call_user_func ($ this ->job , $ this );
152152 } catch (\Throwable $ e ) {
153- $ this ->log (' [worker ' . posix_getpid () . ' ] ' . $ e );
153+ $ this ->log (" [worker. { $ this -> id } { $ this -> workerPid } ] " . $ e );
154154 // rerun
155155 $ this ->run ();
156156 }
157157 }
158158
159159 public function handleShutdown ()
160160 {
161- $ errmsg = ' [worker ' . posix_getpid () . ' ] process terminated ' ;
161+ $ errmsg = " [worker. { $ this -> id } { $ this -> workerPid } ] process terminated " ;
162162 // Handle last error.
163163 $ error = error_get_last ();
164164 if ($ error ) {
@@ -223,7 +223,7 @@ public function signalShutdownHandler($signo)
223223 unset(static ::$ workers [$ id ]);
224224 }
225225 } else {
226- $ this ->log (' [worker ' . posix_getpid () . ' ] ' . $ msg );
226+ $ this ->log (" [worker. { $ this -> id } { $ this -> workerPid } ] " . $ msg );
227227
228228 // Worker process exit.
229229 exit (0 );
You can’t perform that action at this time.
0 commit comments