From 178f0dfa1727f0e1236b61e3d79a562ed48893f7 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Wed, 2 Jan 2019 17:31:12 +0100 Subject: [PATCH] Refactoring: Stopping of scheduler worker process (via SIGTERM) isn't handled gracefully and prints Error (with Backtrace). --- script/scheduler.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/scheduler.rb b/script/scheduler.rb index f82aa8801..c92a95efa 100755 --- a/script/scheduler.rb +++ b/script/scheduler.rb @@ -62,5 +62,9 @@ Daemons.run_proc('scheduler', daemon_options) do Rails.logger.info 'Scheduler stopped.' end - Scheduler.threads + begin + Scheduler.threads + rescue Interrupt + nil + end end