class MaintenanceOrchestrator::SolidQueueBackend
Maps the orchestration interface onto Active Job / Solid Queue. Backoff is expressed with set(wait:), never by sleeping inside a job.
Public Instance Methods
Source
# File app/services/maintenance_orchestrator/solid_queue_backend.rb, line 26 def drain_engine DrainEngineJob.perform_later end
Enqueues DrainEngineJob.
# File app/services/maintenance_orchestrator/solid_queue_backend.rb, line 33 def execute_maintenance(execution_history_id) ExecuteMaintenanceJob.perform_later(execution_history_id) end
Enqueues ExecuteMaintenanceJob.
@param execution_history_id [Integer] the execution to run
# File app/services/maintenance_orchestrator/solid_queue_backend.rb, line 16 def retry_lock_acquisition(execution_history_id) StartExecutionOnEngineJob.set(wait: 5.minutes).perform_later(execution_history_id) end
Enqueues StartExecutionOnEngineJob after a 5-minute backoff.
@param execution_history_id [Integer] the execution to retry
# File app/services/maintenance_orchestrator/solid_queue_backend.rb, line 40 def retry_maintenance(execution_history_id) ExecuteMaintenanceJob.set(wait: 10.minutes).perform_later(execution_history_id) end
Enqueues ExecuteMaintenanceJob after a 10-minute backoff.
@param execution_history_id [Integer] the execution to retry
# File app/services/maintenance_orchestrator/solid_queue_backend.rb, line 48 def retry_pending_maintenance(execution_history_id) ExecuteMaintenanceJob.set(wait: 5.seconds).perform_later(execution_history_id) end
Re-enqueues ExecuteMaintenanceJob shortly after it was consumed before the primary status: :running write was visible (cross-database race).
@param execution_history_id [Integer] the execution to retry
# File app/services/maintenance_orchestrator/solid_queue_backend.rb, line 9 def start_execution_on_engine(execution_history_id) StartExecutionOnEngineJob.perform_later(execution_history_id) end
Enqueues StartExecutionOnEngineJob immediately.
@param execution_history_id [Integer] the execution to start
Source
# File app/services/maintenance_orchestrator/solid_queue_backend.rb, line 21 def supervise_engine_start SuperviseEngineStartJob.perform_later end
Enqueues SuperviseEngineStartJob.
# File app/services/maintenance_orchestrator/solid_queue_backend.rb, line 56 def sync_catalog(catalog_id, force: false) CatalogSyncJob.perform_later(catalog_id, force: force) end
Enqueues CatalogSyncJob.
@param catalog_id [Integer] the catalog to sync @param force [Boolean] whether to force a full resync