allow only positive shutdown delay

more explicit test case, remove select statement
This commit is contained in:
Drew Bailey
2019-12-03 08:58:29 -05:00
parent 672b76056b
commit 3b033b2ef5
5 changed files with 62 additions and 24 deletions

View File

@@ -16,6 +16,15 @@ type RunnerPrerunHook interface {
Prerun() error
}
// RunnerPreKillHooks are executed inside of KillTasks before
// iterating and killing each task. It will run before the Leader
// task is killed.
type RunnerPreKillHook interface {
RunnerHook
PreKill()
}
// RunnerPostrunHooks are executed after calling TaskRunner.Run, even for
// terminal allocations. Therefore Postrun hooks must be safe to call without
// first calling Prerun hooks.
@@ -53,10 +62,3 @@ type ShutdownHook interface {
Shutdown()
}
//
type RunnerPreKillHook interface {
RunnerHook
PreKill()
}