mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
12 lines
347 B
Ruby
12 lines
347 B
Ruby
class ValidationEventCheckForceDeleteJob < ApplicationJob
|
|
def perform(event_id, contact_id)
|
|
event = ValidationEvent.find(event_id)
|
|
contact = Contact.find(contact_id)
|
|
|
|
if contact.need_to_start_force_delete?
|
|
event.start_force_delete
|
|
elsif contact.need_to_lift_force_delete?
|
|
event.refresh_status_notes
|
|
end
|
|
end
|
|
end
|