about summary refs log tree commit diff
path: root/app/workers/unmerge_worker.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-04-04 00:53:20 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-04-04 00:53:20 +0200
commitf722bd2387df9163760014e9555928ec487ae95f (patch)
tree77ffecc4b48f924dbf49a0f179640850dd5a365b /app/workers/unmerge_worker.rb
parent8232f76c482d3046055bd7bf224ef7835d0fa399 (diff)
Separate background jobs into different queues. ATTENTION: new queue "pull"
must be added to the Sidekiq invokation in your systemd file

The pull queue will handle link crawling, thread resolving, and OStatus
processing. Such tasks are more likely to hang for a longer time (due to
network requests) so it is more sensible to not make the "in-house" tasks
wait for them.
Diffstat (limited to 'app/workers/unmerge_worker.rb')
-rw-r--r--app/workers/unmerge_worker.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/unmerge_worker.rb b/app/workers/unmerge_worker.rb
index dbf7243de..ea6aacebf 100644
--- a/app/workers/unmerge_worker.rb
+++ b/app/workers/unmerge_worker.rb
@@ -3,6 +3,8 @@
 class UnmergeWorker
   include Sidekiq::Worker
 
+  sidekiq_options queue: 'pull'
+
   def perform(from_account_id, into_account_id)
     FeedManager.instance.unmerge_from_timeline(Account.find(from_account_id), Account.find(into_account_id))
   end