File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 2424ENV_VAR_PREFIX = 'FLOWER_'
2525
2626
27+ def sigterm_handler (signum , _ ):
28+ logger .info ('%s detected, shutting down' , signum )
29+ sys .exit (0 )
30+
31+
2732@click .command (cls = CeleryCommand ,
2833 context_settings = {
2934 'ignore_unknown_options' : True
@@ -43,13 +48,11 @@ def flower(ctx, tornado_argv):
4348 flower_app = Flower (capp = app , options = options , ** settings )
4449
4550 atexit .register (flower_app .stop )
51+ signal .signal (signal .SIGTERM , sigterm_handler )
4652
47- def sig_handler (signalnum , _ ):
48- logger .info ('%s detected, shutting down' , signalnum )
49- sys .exit (0 )
53+ if not ctx .obj .quiet :
54+ print_banner (app , 'ssl_options' in settings )
5055
51- signal .signal (signal .SIGTERM , sig_handler )
52- print_banner (app , 'ssl_options' in settings )
5356 try :
5457 flower_app .start ()
5558 except (KeyboardInterrupt , SystemExit ):
You can’t perform that action at this time.
0 commit comments