15 lines
289 B
Ruby
15 lines
289 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class ExpiringStatusWorker
|
||
|
include Sidekiq::Worker
|
||
|
|
||
|
sidekiq_options unique: :until_executed
|
||
|
|
||
|
def perform(status_id)
|
||
|
status = Status.find(status_id)
|
||
|
RemovalWorker.perform_async(status.id)
|
||
|
rescue ActiveRecord::RecordNotFound
|
||
|
true
|
||
|
end
|
||
|
end
|