We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4dd3df commit 40489d6Copy full SHA for 40489d6
src/Process.php
@@ -54,6 +54,8 @@ public function start()
54
55
$this->setProcName();
56
57
+ register_shutdown_function([$this, 'handleShutdown']);
58
+
59
// Run worker.
60
$this->run();
61
exit(0);
@@ -144,13 +146,13 @@ protected function setProcName()
144
146
145
147
protected function run()
148
{
- register_shutdown_function([$this, 'handleShutdown']);
-
149
try {
150
// Run job.
151
call_user_func($this->job, $this);
152
} catch (\Throwable $e) {
153
$this->log('[worker '. posix_getpid() .'] ' . $e);
154
+ // rerun
155
+ $this->run();
156
}
157
158
0 commit comments