Created
April 26, 2016 00:38
-
-
Save sax/609c94bc507ea73f5e3369a1fa9fcef8 to your computer and use it in GitHub Desktop.
Example sidekiq worker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Worker | |
include Sidekiq::Worker | |
def perform(message) | |
puts message | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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