class SuperviseEngineStartJob
Follows the engine start from beginning to end. Resumable: if the worker dies, Solid Queue re-enqueues it and the job re-evaluates the real cluster state instead of assuming where it left off.
Constants
- POLL_INTERVAL
Public Instance Methods
Source
# File app/jobs/supervise_engine_start_job.rb, line 12 def perform state = TrinoEngineSupervisor.state return unless state.status == "starting" state.increment!(:start_attempts) ensure_cluster_present wait_until_ready! TrinoEngineSupervisor.transition!(state, "up", last_error: nil) TrinoEngineSupervisor.release_pending! # All demand may have been cancelled while we were booting. Re-evaluate. TrinoEngineSupervisor.demand_finished! rescue TrinoEngineSupervisor::ConcurrentTransitionError nil rescue TrinoProvisioner::Error, Timeout::Error => e handle_start_failure(state, e) end
Ensures the Trino cluster exists, waits until it is ready, marks the engine up (recording the transition and broadcasting it), then releases pending executions.