File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,10 @@ if($count > 1) {
130
130
131
131
$ PIDFILE = getenv ('PIDFILE ' );
132
132
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
+ );
135
137
}
136
138
137
139
$ registered = TRUE ;
@@ -171,11 +173,13 @@ else {
171
173
$ worker ->logLevel = $ logLevel ;
172
174
$ worker ->hasParent = FALSE ;
173
175
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
+ }
179
183
180
184
$ logger ->log (Psr \Log \LogLevel::NOTICE , 'Starting worker {worker} ' , array ('worker ' => $ worker ));
181
185
$ worker ->work ($ interval , $ BLOCKING );
You can’t perform that action at this time.
0 commit comments