2016-11-29 16:32:25 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class RemovalWorker
|
|
|
|
include Sidekiq::Worker
|
|
|
|
|
2019-08-22 05:17:12 +03:00
|
|
|
def perform(status_id, options = {})
|
2019-08-22 22:55:56 +03:00
|
|
|
RemoveStatusService.new.call(Status.with_discarded.find(status_id), **options.symbolize_keys)
|
2016-12-19 10:31:12 +02:00
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
true
|
2016-11-29 16:32:25 +02:00
|
|
|
end
|
2016-12-11 23:23:11 +02:00
|
|
|
end
|