Homec4science

make Trigger Daemon sleep correctly when one-time triggers exist

Authored by Aviv Eyal <avivey@gmail.com> on Apr 18 2016, 22:43.

Description

make Trigger Daemon sleep correctly when one-time triggers exist

Summary:
Trigger daemon is trying to find the next event to invoke before sleeping, but the query includes already-elapsed triggers.
It then tries to sleep for 0 seconds.

Test Plan:
On a new instance, schedule a single trigger of type PhabricatorOneTimeTriggerClock to a very near time.

Use top to see trigger daemon not going to 100% CPU once the event has elapsed.

Reviewers: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15750

Details

Committed
Aviv Eyal <avivey@gmail.com>Apr 18 2016, 23:17
Pushed
aubortJan 31 2017, 17:16
Parents
rPH091a64e91bf6: Rename Differential field Projects to Tags
Branches
Unknown
Tags
Unknown

Event Timeline

Aviv Eyal <avivey@gmail.com> committed rPHa3bb35e9d20a: make Trigger Daemon sleep correctly when one-time triggers exist (authored by Aviv Eyal <avivey@gmail.com>).Apr 18 2016, 23:17