1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Worker - supporting running queued tasks in process

Summary: Ref D8930. My "send test" for SMS was failing before this patch, and now it works nicely.

Test Plan: Used new code in D8930 that uses $this->queueTask() to get some work done and it got done in process

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9018
This commit is contained in:
Bob Trahan 2014-05-08 13:14:58 -07:00
parent c3838c5354
commit 61dd5ab6c1

View file

@ -97,6 +97,10 @@ abstract class PhabricatorWorker {
while (true) {
try {
$worker->doWork();
foreach ($worker->getQueuedTasks() as $queued_task) {
list($queued_class, $queued_data) = $queued_task;
self::scheduleTask($queued_class, $queued_data);
}
break;
} catch (PhabricatorWorkerYieldException $ex) {
phlog(