Last active
May 17, 2019 15:50
-
-
Save BernardoMG/0bf378116bc0f9136f11ae024e34d3aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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 PrinterWorker | |
include Sidekiq::Worker | |
sidekiq_options queue: :default, retry: 0, backtrace: true | |
def perform(message) | |
@message = message | |
print_message_on_console | |
end | |
private | |
def print_message_on_console | |
puts "Hello! I'm #{self.jid} and I'm delivering the following message: #{@message}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment