diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-26 17:49:32 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-26 17:49:32 -0500 |
commit | 1aba334730aad01550d72e5c7f0f046d231459d4 (patch) | |
tree | 7fdc4b381f4793844d3c7c64f6a9944e44a4a1fb /app/workers/scheduler | |
parent | f9e382b9a655d0eb0da1e6641f526b14485ce2bf (diff) |
process self-destructing roars asynchronously
Diffstat (limited to 'app/workers/scheduler')
-rw-r--r-- | app/workers/scheduler/destructing_statuses_scheduler.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/scheduler/destructing_statuses_scheduler.rb b/app/workers/scheduler/destructing_statuses_scheduler.rb index d79f97c33..6fc4ecccf 100644 --- a/app/workers/scheduler/destructing_statuses_scheduler.rb +++ b/app/workers/scheduler/destructing_statuses_scheduler.rb @@ -7,13 +7,13 @@ class Scheduler::DestructingStatusesScheduler def perform due_statuses.find_each do |destructing_status| - DestructStatusWorker.perform_at(destructing_status.delete_after, destructing_status.id) + DestructStatusWorker.perform_async(destructing_status.id) end end private def due_statuses - DestructingStatus.where('delete_after <= ?', Time.now.utc + PostStatusService::MIN_DESTRUCT_OFFSET) + DestructingStatus.where('delete_after <= ?', Time.now.utc) end end |