summaryrefslogtreecommitdiff
path: root/zuul/cmd/fingergw.py
diff options
context:
space:
mode:
Diffstat (limited to 'zuul/cmd/fingergw.py')
-rw-r--r--zuul/cmd/fingergw.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/zuul/cmd/fingergw.py b/zuul/cmd/fingergw.py
index 920eed8f2..0d47f0848 100644
--- a/zuul/cmd/fingergw.py
+++ b/zuul/cmd/fingergw.py
@@ -14,7 +14,6 @@
# under the License.
import logging
-import signal
import sys
import zuul.cmd
@@ -47,6 +46,9 @@ class FingerGatewayApp(zuul.cmd.ZuulDaemonApp):
if self.args.command:
self.args.nodaemon = True
+ def exit_handler(self, signum, frame):
+ self.stop()
+
def run(self):
'''
Main entry point for the FingerGatewayApp.
@@ -84,19 +86,7 @@ class FingerGatewayApp(zuul.cmd.ZuulDaemonApp):
self.log.info('Starting Zuul finger gateway app')
self.gateway.start()
- if self.args.nodaemon:
- # NOTE(Shrews): When running in non-daemon mode, although sending
- # the 'stop' command via the command socket will shutdown the
- # gateway, it's still necessary to Ctrl+C to stop the app.
- while True:
- try:
- signal.pause()
- except KeyboardInterrupt:
- print("Ctrl + C: asking gateway to exit nicely...\n")
- self.stop()
- break
- else:
- self.gateway.wait()
+ self.gateway.wait()
self.log.info('Stopped Zuul finger gateway app')