Skip to content
Snippets Groups Projects
Commit 7dea6a23 authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Move Salmon processing to background as well as PuSH

parent 2c58e7e0
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ class Api::SalmonController < ApiController
if body.nil?
head 200
else
ProcessInteractionService.new.call(body, @account)
SalmonWorker.perform_async(@account.id, body.force_encoding('UTF-8'))
head 201
end
end
......
# frozen_string_literal: true
class SalmonWorker
include Sidekiq::Worker
def perform(account_id, body)
ProcessInteractionService.new.call(body, Account.find(account_id))
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment