From 1aba334730aad01550d72e5c7f0f046d231459d4 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 26 Jul 2019 17:49:32 -0500 Subject: process self-destructing roars asynchronously --- app/workers/scheduler/destructing_statuses_scheduler.rb | 4 ++-- 1 file 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 -- cgit