Homec4science

Add a flag to ./bin/worker to select tasks based on their failureCount

Authored by Josh Cox <joshcox@uberatc.com> on Oct 12 2016, 11:29.

Description

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

Details

Committed
Josh Cox <joshcox@uberatc.com>Oct 12 2016, 15:49
Pushed
aubortJan 31 2017, 17:16
Parents
rPHbcfd515b320d: Run all minor setup checks on all configured database hosts
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cox <joshcox@uberatc.com> committed rPHac66522c2e27: Add a flag to ./bin/worker to select tasks based on their failureCount (authored by Josh Cox <joshcox@uberatc.com>).Oct 12 2016, 15:49