Skip to content

Commit 9415524

Browse files
Can't fork on Windows but we can run the job anyway
1 parent 0b0f9dc commit 9415524

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Resque/Worker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ public function work($interval = 5)
186186

187187
$this->child = Resque::fork();
188188

189-
// Forked and we're the child. Run the job.
190-
if ($this->child === 0 || $this->child === false) {
189+
// Forked and we're the child. Or this is Windows. Run the job.
190+
if ($this->child === 0 || $this->child === false || strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
191191
$status = 'Processing ' . $job->queue . ' since ' . strftime('%F %T');
192192
$this->updateProcLine($status);
193193
$this->log($status, self::LOG_VERBOSE);

0 commit comments

Comments
 (0)