demarches-normaliennes/app/tasks/maintenance/destroy_incomplete_bulk_messages_task.rb

14 lines
286 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Maintenance
class DestroyIncompleteBulkMessagesTask < MaintenanceTasks::Task
def collection
BulkMessage.where(procedure: nil).where.missing(:groupe_instructeurs)
end
def process(element)
element.destroy
end
end
end