Commit a91c3ef6 authored by Eugen Rochko's avatar Eugen Rochko

Delegate processing of incoming PuSH data to background workers

parent cea28e0c
......@@ -16,7 +16,7 @@ class Api::SubscriptionsController < ApiController
subscription = @account.subscription(api_subscription_url(
if subscription.verify(body, request.headers['HTTP_X_HUB_SIGNATURE']), @account)
ProcessingWorker.perform_async(, body.force_encoding('UTF-8'))
head 201
head 202
class ProcessingWorker
include Sidekiq::Worker
def perform(account_id, body), Account.find(account_id))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment