Fix updates restart task not being started
This commit is contained in:
@@ -109,6 +109,8 @@ func prep() error {
|
|||||||
func start() error {
|
func start() error {
|
||||||
initConfig()
|
initConfig()
|
||||||
|
|
||||||
|
restartTask = module.NewTask("automatic restart", automaticRestart).MaxDelay(10 * time.Minute)
|
||||||
|
|
||||||
if err := module.RegisterEventHook(
|
if err := module.RegisterEventHook(
|
||||||
"config",
|
"config",
|
||||||
"config change",
|
"config change",
|
||||||
|
|||||||
@@ -20,10 +20,6 @@ var (
|
|||||||
restartTriggered = abool.New()
|
restartTriggered = abool.New()
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
|
||||||
restartTask = module.NewTask("automatic restart", automaticRestart).MaxDelay(10 * time.Minute)
|
|
||||||
}
|
|
||||||
|
|
||||||
// DelayedRestart triggers a restart of the application by shutting down the
|
// DelayedRestart triggers a restart of the application by shutting down the
|
||||||
// module system gracefully and returning with RestartExitCode. The restart
|
// module system gracefully and returning with RestartExitCode. The restart
|
||||||
// may be further delayed by up to 10 minutes by the internal task scheduling
|
// may be further delayed by up to 10 minutes by the internal task scheduling
|
||||||
|
|||||||
Reference in New Issue
Block a user