diff options
Diffstat (limited to 'zuul/cmd/executor.py')
-rwxr-xr-x | zuul/cmd/executor.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/zuul/cmd/executor.py b/zuul/cmd/executor.py index 15ff0272b..500b41516 100755 --- a/zuul/cmd/executor.py +++ b/zuul/cmd/executor.py @@ -44,7 +44,11 @@ class Executor(zuul.cmd.ZuulDaemonApp): self.args.nodaemon = True def exit_handler(self, signum, frame): - self.executor.stop() + graceful = os.environ.get('ZUUL_EXECUTOR_SIGTERM_METHOD', 'stop') + if graceful.lower() == 'graceful': + self.executor.graceful() + else: + self.executor.stop() def start_log_streamer(self): pipe_read, pipe_write = os.pipe() |