2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2024-09-23 18:32:13 +02:00
|
|
|
namespace :deploy do
|
|
|
|
task maintenance_tasks: :environment do
|
|
|
|
tasks = MaintenanceTasks::Task
|
|
|
|
.load_all
|
|
|
|
.filter { _1.respond_to?(:run_on_deploy?) && _1.run_on_deploy? }
|
|
|
|
|
|
|
|
tasks.each do |task|
|
|
|
|
Rails.logger.info { "MaintenanceTask run on deploy #{task.name}" }
|
|
|
|
MaintenanceTasks::Runner.run(name: task.name)
|
|
|
|
end
|
2020-05-14 16:11:00 +02:00
|
|
|
end
|
|
|
|
end
|