Sha256: 8c5f845fd257ff61f9941aeeec4f9335a8feb2c828b02c0cd13aea704c798c19
Contents?: true
Size: 564 Bytes
Versions: 4
Compression:
Stored size: 564 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module AcidicJob module PerformAcidicly extend ActiveSupport::Concern # `perform_now` runs a job synchronously and immediately # `perform_later` runs a job asynchronously and queues it immediately # `perform_acidicly` run a job asynchronously and queues it after a successful database commit class_methods do def perform_acidicly(...) job_or_instantiate(...).perform_acidicly end end def perform_acidicly Run.stage!(self) end end end
Version data entries
4 entries across 4 versions & 1 rubygems