Skip to content

Instantly share code, notes, and snippets.

@yulgolem
Created October 27, 2018 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yulgolem/76d8a1ca7019d045db1c22f98da2d70c to your computer and use it in GitHub Desktop.
Save yulgolem/76d8a1ca7019d045db1c22f98da2d70c to your computer and use it in GitHub Desktop.
class InteractionWorker
include Sidekiq::Worker
sidekiq_options retry: 10
def perform(class_name, params)
interaction_class = class_name.constantize
raise "Unexpected interaction class #{class_name}" unless interaction_class <= BaseInteraction
interaction_class.execute(params)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment