2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2018-10-01 17:41:17 +00:00
|
|
|
namespace :zammad do
|
|
|
|
|
|
|
|
namespace :ci do
|
|
|
|
|
|
|
|
namespace :service do
|
|
|
|
|
|
|
|
namespace :scheduler do
|
|
|
|
|
|
|
|
desc 'Stops the scheduler'
|
2020-02-18 19:51:31 +00:00
|
|
|
task :stop do # rubocop:disable Rails/RakeEnvironment
|
2018-10-01 17:41:17 +00:00
|
|
|
|
|
|
|
command = [
|
|
|
|
'bundle',
|
|
|
|
'exec',
|
|
|
|
'script/scheduler.rb',
|
|
|
|
'stop',
|
|
|
|
]
|
|
|
|
|
2019-06-28 11:38:49 +00:00
|
|
|
_stdout, stderr, status = Open3.capture3(*command)
|
2018-10-01 17:41:17 +00:00
|
|
|
|
|
|
|
next if status.success?
|
|
|
|
|
|
|
|
abort("Error while stopping scheduler - error status #{status.exitstatus}: #{stderr}")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|