ファイル
btrc-hub/backend/lib/tasks/counts_exports.rake
T
2026-10-26 21:24:32 +09:00

12 行
386 B
Ruby

namespace :counts do
desc 'Process the persistent Counts export queue (run under a process supervisor)'
task export_worker: :environment do
stopping = false
['TERM', 'INT'].each { |signal| Signal.trap(signal) { stopping = true } }
until stopping
worked = Rails.application.executor.wrap { CountsExportJobs.work_one }
sleep(1) unless worked
end
end
end