Skip to content

Instantly share code, notes, and snippets.

@BernardoMG
Last active May 17, 2019 15:50
Show Gist options
  • Save BernardoMG/0bf378116bc0f9136f11ae024e34d3aa to your computer and use it in GitHub Desktop.
Save BernardoMG/0bf378116bc0f9136f11ae024e34d3aa to your computer and use it in GitHub Desktop.
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