spec/integration/no_rails/integration_setup.rb
# This moves the last run of the scheduler to a set time. We must both move the que job
# last_run, and also the internal knowledge "last_run_time" which could be different
# if the job errors.
This moves the last run of the scheduler to a set time. We must both move the que job
last_run, and also the internal knowledge "last_run_time" which could be different
if the job errors.
This moves the last run of the scheduler to a set time . We must both move the que job last_run and also the internal knowledge " last_run_time " which could be different if the job errors .
def make_scheduler_last_run(time)
      Que::Scheduler::VersionSupport.execute(<<~SQL)
        UPDATE que_jobs SET run_at = '#{time}'
        WHERE job_class = 'Que::Scheduler::SchedulerJob'
      SQL
      args = Que::Scheduler::VersionSupport.execute(<<~SQL).first[:args]
        SELECT * FROM que_jobs WHERE job_class = 'Que::Scheduler::SchedulerJob'
      SQL
      args.first["last_run_time"] = time
      Que::Scheduler::VersionSupport.execute(<<~SQL)
        UPDATE que_jobs
        SET args = '#{args.to_json}'
        WHERE job_class = 'Que::Scheduler::SchedulerJob'
      SQL
    end
def make_scheduler_last_run ( time ) Que :: Scheduler :: VersionSupport . execute ( <<~SQL ) 
        UPDATE que_jobs SET run_at = ' #{ time } '
        WHERE job_class = 'Que::Scheduler::SchedulerJob'
       SQL args = Que :: Scheduler :: VersionSupport . execute ( <<~SQL ) . first [ :args ] 
        SELECT * FROM que_jobs WHERE job_class = 'Que::Scheduler::SchedulerJob'
       SQL args . first [ "last_run_time" ] = time Que :: Scheduler :: VersionSupport . execute ( <<~SQL ) 
        UPDATE que_jobs
        SET args = ' #{ args . to_json } '
        WHERE job_class = 'Que::Scheduler::SchedulerJob'
       SQL end
This moves the last run of the scheduler to a set time.
This moves the last run of the scheduler to a set time .
time