about summary refs log tree commit diff
path: root/app/workers/scheduler
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-26 17:49:32 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-26 17:49:32 -0500
commit1aba334730aad01550d72e5c7f0f046d231459d4 (patch)
tree7fdc4b381f4793844d3c7c64f6a9944e44a4a1fb /app/workers/scheduler
parentf9e382b9a655d0eb0da1e6641f526b14485ce2bf (diff)
process self-destructing roars asynchronously
Diffstat (limited to 'app/workers/scheduler')
-rw-r--r--app/workers/scheduler/destructing_statuses_scheduler.rb4
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