Class: ExternalServices::ApiJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- ExternalServices::ApiJob
- Defined in:
- app/jobs/external_services/api_job.rb
Instance Method Summary collapse
Instance Method Details
#action_class ⇒ Object
9 10 11 |
# File 'app/jobs/external_services/api_job.rb', line 9 def action_class "ExternalServices::ApiActions::#{self.class.to_s.demodulize.gsub(/ApiJob/, '')}".constantize end |
#perform(action_id) ⇒ Object
13 14 15 16 17 18 |
# File 'app/jobs/external_services/api_job.rb', line 13 def perform(action_id) action = action_class.find(action_id) return if action.processed? action.execute! end |