-
Notifications
You must be signed in to change notification settings - Fork 28
Internals
-
deadlocked - can't be run due to other host failures
-
failed - has run, but failed
-
finished - ran successfully
-
halted - ??
-
offline - manually marked offline
-
ready - ready to run, waiting for a worker
-
running - worker is currently connected
-
skipped - manually skipped
-
unreachable - could not be reached
-
waiting - waiting for host meta-information
Pogo::Engine::Job->start(targets)
is called with targets supplied with the job
Pogo::Engine::Job::expand_targets
produces a flattened list of targets
Pogo::Engine::Job::fetch_target_meta(@hosts, $cont)
$plugin->new()
is called for each plugin in the namespace config
- if $plugin is a singleton it should flush cache on
new();
$plugin->fetch_meta(@hosts, $cont, $errc)
-
$cont->()
gets a hashref of hosts resolved so far. plugins may implement batching/parallelism as necessary -
probably write a new state into the job log every so often
-
$cont->()
checks whether or not it's the last host of the last plugin to check in and move on
back in ->start()
, we have a hash of hostname=>meta that we know is complete because of the continuation
what do we need to do here?
given the information in our %targets hash we should be able to compute and write slots to storage, this doesn't need to be asyncronous
Job::fetch_all_slots()
should really be Job::fetch_runnable_hosts()
, and we should call it once at the end of start(); after that it should be called on each host completion.