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

17 lines
528 B
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# frozen_string_literal: true
module Maintenance
class DestroyIncompleteBulkMessagesTask < MaintenanceTasks::Task
# Périmètre: envoi dun email groupé aux usagers ayant dossiers en brouillon.
# Change la manière dont ces messages sont liés aux démarches.
# Suite de BackfillBulkMessagesWithProcedureIdTask
# 2024-03-12-01 PR #10071
def collection
BulkMessage.where(procedure: nil).where.missing(:groupe_instructeurs)
end
def process(element)
element.destroy
end
end
end