Created
April 9, 2023 13:56
-
-
Save salvadorgascon/e8ca9aedf9f7380003ffe71c0b7cd069 to your computer and use it in GitHub Desktop.
Active Job example in Ruby on Rails
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
# HACK: Required to foce load env vars | |
if Rails.env.development? || Rails.env.test? | |
require 'dotenv/load' | |
end | |
class MyJob < ApplicationJob | |
queue_as :default | |
def perform(*args) | |
# Do something later | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment