Homec4science

Allow tasks to yield to other tasks

Authored by epriestley <git@epriestley.com> on Apr 16 2014, 22:02.

Description

Allow tasks to yield to other tasks

Summary:
For Harbormaster tasks which want to poll or wait, this lets them say "try again a little later" without having to sleep and hold a queue slot.

This is basically the same as failing, except that we don't increment the failure counter. Instead, we just set the current lease to the correct length and then exit. The task will be retried after the lease expires.

Test Plan: Using both bin/harbormaster and phd debug taskmaster, ran a lot of waiting tasks through the queue, faking them to either yield or not yield in a controlled manner. The queue responded as expected, yielding tasks appropraitely and retrying them later.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

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

Details

Committed
epriestley <git@epriestley.com>Apr 16 2014, 22:02
Pushed
aubortJan 31 2017, 17:16
Parents
rPHafd04731ab1f: Add a "Create build step" transaction to Harbormaster
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH4a6d2e9c9730: Allow tasks to yield to other tasks (authored by epriestley <git@epriestley.com>).Apr 16 2014, 22:02