Module: LcpRuby::BatchActions
- Defined in:
- lib/lcp_ruby/batch_actions.rb,
lib/lcp_ruby/batch_actions/base_service.rb,
lib/lcp_ruby/batch_actions/destroy_service.rb,
lib/lcp_ruby/batch_actions/restore_service.rb,
lib/lcp_ruby/batch_actions/batch_action_handler.rb,
lib/lcp_ruby/batch_actions/custom_action_dispatcher.rb,
lib/lcp_ruby/batch_actions/permanently_destroy_service.rb
Defined Under Namespace
Classes: BaseService, BatchActionHandler, CustomActionDispatcher, DestroyService, PermanentlyDestroyService, RestoreService
Constant Summary collapse
- BUILT_IN_ACTIONS =
%w[destroy restore permanently_destroy].freeze
Class Method Summary collapse
Class Method Details
.register_background_job! ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/lcp_ruby/batch_actions/batch_action_handler.rb', line 3 def self.register_background_job! return if @background_job_registered return unless BackgroundJobs::Registry.available? return if BackgroundJobs::Registry.definition_by_name("batch_action") definition = BackgroundJobs::Definition.new( name: "batch_action", handler_type: "class", handler_class: "LcpRuby::BatchActions::BatchActionHandler", queue: "default", retry_count: 0, retry_interval: "fixed:0", timeout: 0 ) BackgroundJobs::Registry.register_definition!(definition) @background_job_registered = true end |