|
|
@ -21,6 +21,7 @@ var ( |
|
|
|
Subcommands: []cli.Command{ |
|
|
|
Subcommands: []cli.Command{ |
|
|
|
subcmdShutdown, |
|
|
|
subcmdShutdown, |
|
|
|
subcmdRestart, |
|
|
|
subcmdRestart, |
|
|
|
|
|
|
|
subcmdReloadTemplates, |
|
|
|
subcmdFlushQueues, |
|
|
|
subcmdFlushQueues, |
|
|
|
subcmdLogging, |
|
|
|
subcmdLogging, |
|
|
|
subCmdProcesses, |
|
|
|
subCmdProcesses, |
|
|
@ -46,6 +47,16 @@ var ( |
|
|
|
}, |
|
|
|
}, |
|
|
|
Action: runRestart, |
|
|
|
Action: runRestart, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
subcmdReloadTemplates = cli.Command{ |
|
|
|
|
|
|
|
Name: "reload-templates", |
|
|
|
|
|
|
|
Usage: "Reload template files in the running process", |
|
|
|
|
|
|
|
Flags: []cli.Flag{ |
|
|
|
|
|
|
|
cli.BoolFlag{ |
|
|
|
|
|
|
|
Name: "debug", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
Action: runReloadTemplates, |
|
|
|
|
|
|
|
} |
|
|
|
subcmdFlushQueues = cli.Command{ |
|
|
|
subcmdFlushQueues = cli.Command{ |
|
|
|
Name: "flush-queues", |
|
|
|
Name: "flush-queues", |
|
|
|
Usage: "Flush queues in the running process", |
|
|
|
Usage: "Flush queues in the running process", |
|
|
@ -115,6 +126,15 @@ func runRestart(c *cli.Context) error { |
|
|
|
return handleCliResponseExtra(extra) |
|
|
|
return handleCliResponseExtra(extra) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func runReloadTemplates(c *cli.Context) error { |
|
|
|
|
|
|
|
ctx, cancel := installSignals() |
|
|
|
|
|
|
|
defer cancel() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setup(ctx, c.Bool("debug")) |
|
|
|
|
|
|
|
extra := private.ReloadTemplates(ctx) |
|
|
|
|
|
|
|
return handleCliResponseExtra(extra) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func runFlushQueues(c *cli.Context) error { |
|
|
|
func runFlushQueues(c *cli.Context) error { |
|
|
|
ctx, cancel := installSignals() |
|
|
|
ctx, cancel := installSignals() |
|
|
|
defer cancel() |
|
|
|
defer cancel() |
|
|
|