WISHLIST: Smart Action Triggers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
action_
I propose something a little more sophisticated. I'm not entirely sure what shape it takes but the main idea is:
What if we had something that would read through all of the definitions and spawn the runner process based on the definition's "frequency" (introducing a new column called frequency (type INTERVAL)).
What if the "something" also managed the maximum number of events the process is allowed to work on?
What if the "something" also played nice on the hardware. Where it could make sure the machine CPU utilization was below a configured threshold before it was allowed to spawn a new runner?
This "something" would be the only thing that needs to be administratively running. No more need for the crontab spaghetti of action_
It could also automatically reset "lost" triggers back to pending (like what I was doing by hand), when the action_
More ideas welcome! The idea is that this needs to be better kept track of by software. And if we're doing a better job of keeping track of it, we might as well automate the whole thing to where it fixes itself too. Or at least alerts the admin's when something needs attention. We use monitoring software to look for stuck triggers, and we supplement that with a cron that resets the triggers if they are stuck with a start_time more than 3 days old. That's a hack but it seems to keep the trouble at bay most of the time.
IRC discussion:
http://
and our "fix" cron:
BEGIN;
UPDATE action_
SET
state='pending',
start_time=NULL,
update_time=NULL,
complete_time=NULL,
update_
template_
WHERE id
IN
(
SELECT id
FROM
action_
WHERE
start_time BETWEEN (now() - '14 days'::INTERVAL) AND (now() - '3 days'::INTERVAL) AND
state NOT IN('complete'
ORDER BY 1
LIMIT 5000
);
COMMIT;
cron frequency:
0 5,10,13,18,23 * * *
tags: | added: actiontrigger |
Changed in evergreen: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
summary: |
- WISHLSIT: Smart Action Triggers + WISHLIST: Smart Action Triggers |