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+ 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) {