File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,8 +130,10 @@ if($count > 1) {
130130
131131 $ PIDFILE = getenv ('PIDFILE ' );
132132 if ($ PIDFILE ) {
133- file_put_contents ($ PIDFILE , getmypid ()) or
134- die ('Could not write PID information to ' . $ PIDFILE );
133+ file_put_contents ($ PIDFILE , getmypid ()) or (
134+ $ logger ->log (Psr \Log \LogLevel::NOTICE , 'Could not write PID information to {pidfile} ' , array ('pidfile ' => $ PIDFILE )) and
135+ die (2 )
136+ );
135137 }
136138
137139 $ registered = TRUE ;
@@ -171,11 +173,13 @@ else {
171173 $ worker ->logLevel = $ logLevel ;
172174 $ worker ->hasParent = FALSE ;
173175
174- $ PIDFILE = getenv ('PIDFILE ' );
175- if ($ PIDFILE ) {
176- file_put_contents ($ PIDFILE , getmypid ()) or
177- die ('Could not write PID information to ' . $ PIDFILE );
178- }
176+ $ PIDFILE = getenv ('PIDFILE ' );
177+ if ($ PIDFILE ) {
178+ file_put_contents ($ PIDFILE , getmypid ()) or (
179+ $ logger ->log (Psr \Log \LogLevel::NOTICE , 'Could not write PID information to {pidfile} ' , array ('pidfile ' => $ PIDFILE )) and
180+ die (2 )
181+ );
182+ }
179183
180184 $ logger ->log (Psr \Log \LogLevel::NOTICE , 'Starting worker {worker} ' , array ('worker ' => $ worker ));
181185 $ worker ->work ($ interval , $ BLOCKING );
You can’t perform that action at this time.
0 commit comments