mirror of
https://github.com/we-promise/sure.git
synced 2026-04-17 02:54:10 +00:00
10 lines
222 B
Ruby
10 lines
222 B
Ruby
class DestroyJob < ApplicationJob
|
|
queue_as :low_priority
|
|
|
|
def perform(model)
|
|
model.destroy
|
|
rescue => e
|
|
model.update!(scheduled_for_deletion: false) # Let's the user try again by resetting the state
|
|
end
|
|
end
|