mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
allow only positive shutdown delay
more explicit test case, remove select statement
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user