Sha256: 1f36c8430b01a21f2fadcb4c3c1cd1d7523ad36389dd5a8a9639c769bfc7c69f
Contents?: true
Size: 497 Bytes
Versions: 5
Compression:
Stored size: 497 Bytes
Contents
require "active_job" class StepperMotor::PerformStepJob < ActiveJob::Base def perform(journey_gid) # Pass the GlobalID instead of the record itself, so that we can rescue the non-existing record # exception here as opposed to the job deserialization journey = begin GlobalID::Locator.locate(journey_gid) rescue ActiveRecord::RecordNotFound return # The journey has been canceled and destroyed previously or elsewhere end journey.perform_next_step! end end
Version data entries
5 entries across 5 versions & 1 rubygems