Skip to content

Instantly share code, notes, and snippets.

@krisleech
Created October 7, 2014 14:00
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisleech/d0e7850aeeb631cbae3f to your computer and use it in GitHub Desktop.
Save krisleech/d0e7850aeeb631cbae3f to your computer and use it in GitHub Desktop.
activejob outside of Rails
require 'sidekiq'
require 'active_job'
ActiveJob::Base.queue_adapter = :sidekiq
class Foo < ActiveJob::Base
queue_as :default
def perform
sleep 10
end
end
Foo.perform_later # => undefined method 'perform_later'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment