mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-09 19:13:26 +00:00
Fix #1540 : Unable to start scheduler on Windows platform
This commit is contained in:
@@ -362,7 +362,14 @@ class task_Scheduler
|
||||
);
|
||||
|
||||
if (is_resource($taskPoll[$tkey]["process"])) {
|
||||
sleep(2); // let the process lock and write it's pid
|
||||
// let the process lock and write it's pid
|
||||
$sleepTimeout = microtime(true) + 10;
|
||||
do {
|
||||
usleep(500000);
|
||||
if (null !== $taskPoll[$tkey]['task']->getPID()) {
|
||||
break;
|
||||
}
|
||||
} while (microtime(true) < $sleepTimeout);
|
||||
}
|
||||
|
||||
if (is_resource($taskPoll[$tkey]["process"]) && ($pid = $taskPoll[$tkey]['task']->getPID()) !== null) {
|
||||
|
Reference in New Issue
Block a user