mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 22:40:55 +01:00
9a679bf374
Summary: Fixes T5336. Currently, `PhabricatorWorkerLeaseQuery` is basically FIFO. It makes more sense for the queue to be a priority-queue, and to assign higher priorities to alerts (email and SMS). Test Plan: Created dummy tasks in the queue (with different priorities). Verified that the priority field was set correctly in the DB and that the priority was shown on the `/daemon/` page. Started a `PhabricatorTaskmasterDaemon` and verified that the higher priority tasks were executed before lower priority tasks. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T5336 Differential Revision: https://secure.phabricator.com/D9871
11 lines
371 B
SQL
11 lines
371 B
SQL
ALTER TABLE {$NAMESPACE}_worker.worker_activetask
|
|
ADD COLUMN priority int unsigned NOT NULL;
|
|
|
|
ALTER TABLE {$NAMESPACE}_worker.worker_activetask
|
|
ADD KEY (leaseOwner, priority, id);
|
|
|
|
ALTER TABLE {$NAMESPACE}_worker.worker_archivetask
|
|
ADD COLUMN priority int unsigned NOT NULL;
|
|
|
|
ALTER TABLE {$NAMESPACE}_worker.worker_archivetask
|
|
ADD KEY (leaseOwner, priority, id);
|