Skip to content

Instantly share code, notes, and snippets.

@sax
Created April 26, 2016 00:38
Show Gist options
  • Save sax/609c94bc507ea73f5e3369a1fa9fcef8 to your computer and use it in GitHub Desktop.
Save sax/609c94bc507ea73f5e3369a1fa9fcef8 to your computer and use it in GitHub Desktop.
Example sidekiq worker
class Worker
include Sidekiq::Worker
def perform(message)
puts message
end
end
class MyController < ApplicationController
def create
Worker.perform_async(params.to_s)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment