From 9a06f83d510a56bb1c95cee015769e3e02e1b0f3 Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Tue, 11 Dec 2018 12:55:02 +0100 Subject: [PATCH 1/2] readme: mention heritage of project Fixes https://github.com/resque/php-resque/issues/8 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 53d5959..b127400 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ It also supports the following additional features: - Has built in support for `setUp` and `tearDown` methods, called pre and post jobs +This port is originally based on the works of Chris Boulton et al, see + ## Requirements - PHP 5.3+ From bed36236ba7c6db18b0cb2169b278297ecd81849 Mon Sep 17 00:00:00 2001 From: geekz Date: Sat, 22 Dec 2018 14:17:48 +0800 Subject: [PATCH 2/2] add pcntl_signal_dispatch() in loop --- lib/Resque/Worker.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Resque/Worker.php b/lib/Resque/Worker.php index 3add46e..289d304 100644 --- a/lib/Resque/Worker.php +++ b/lib/Resque/Worker.php @@ -170,6 +170,8 @@ public function work($interval = Resque::DEFAULT_INTERVAL, $blocking = false) $job = $this->reserve($blocking, $interval); } + pcntl_signal_dispatch(); + if(!$job) { // For an interval of 0, break now - helps with unit testing etc if($interval == 0) {