1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-16 18:40:54 +01:00
phorge-phorge/src/infrastructure/daemon
Josh Cox ac66522c2e Add a flag to ./bin/worker to select tasks based on their failureCount
Summary:
I frequently run into a situation where I want to kill tasks that have accumulated a lot of failures regardless of what class they are. Or I'll want to kill every worker of a certain class but only if it has failed at least once. This change allows me to run `./bin/worker cancel --class <MYCLASS> --min-failure-count 5` to only kill tasks with at least 5 failed attempts.

The `--min-failure-count N` argument can be used by itself as well as with `--class CLASSNAME`. I don't think it makes sense for it to work with `--id ID`, but I'm not dead set on that or anything.

Test Plan: I ran the worker management workflow with and without the `--min-failure-count` argument and it worked as expected.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley, yelirekim

Differential Revision: https://secure.phabricator.com/D16906
2016-10-12 09:49:29 -04:00
..
bot Updated the docs so chatbots can use the Conduit API 2016-08-24 19:05:30 -04:00
contentsource Modularize content sources 2016-03-26 11:59:45 -07:00
control Extend from Phobject 2015-06-15 18:02:27 +10:00
garbagecollector Hold a lock while collecting garbage 2016-10-20 13:40:00 -07:00
overseer Fix daemon restart behavior to check once every 10 seconds 2015-11-23 05:59:04 -08:00
workers Add a flag to ./bin/worker to select tasks based on their failureCount 2016-10-12 09:49:29 -04:00
PhabricatorDaemon.php When already running as the daemon user, don't "sudo" daemon commands 2016-08-11 16:41:19 -07:00