Rails-8-API-Image-Processing / spec /support /d4_solid_queue_probe_worker.rb
denise-oneill-inbox-ru's picture
D8 staging from 92665ef4298ecff6735b080ff7901f2c19f719a7 (part 2)
38367b5 verified
Raw History Blame Contribute Delete
703 Bytes
# frozen_string_literal: true
# Test-only Solid Queue worker bootstrap used to prove ACTUAL job execution
# through a real Solid Queue worker path (D4-I7). It loads the application
# environment, registers the test-only probe job class, and starts the
# repository's installed Solid Queue CLI/supervisor. Never used by production.
#
# The start block is guarded by the $PROGRAM_NAME check so that Rails-gem and
# RSpec autoloaders (which glob spec/support/**/*.rb) can require this file
# without launching a worker.
require File.expand_path("config/environment", Dir.pwd)
require_relative "d4_solid_queue_probe_job"
require "solid_queue/cli"
SolidQueue::Cli.start(ARGV) if $PROGRAM_NAME == __FILE__