about summary refs log tree commit diff
path: root/app/workers/pubsubhubbub/subscribe_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/pubsubhubbub/subscribe_worker.rb')
-rw-r--r--app/workers/pubsubhubbub/subscribe_worker.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/workers/pubsubhubbub/subscribe_worker.rb b/app/workers/pubsubhubbub/subscribe_worker.rb
new file mode 100644
index 000000000..0c4111a8c
--- /dev/null
+++ b/app/workers/pubsubhubbub/subscribe_worker.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class Pubsubhubbub::SubscribeWorker
+  include Sidekiq::Worker
+
+  sidekiq_options queue: 'push'
+
+  def perform(account_id)
+    account = Account.find(account_id)
+    Rails.logger.debug "PuSH re-subscribing to #{account.acct}"
+    ::SubscribeService.new.call(account)
+  end
+end