aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/support/integration/adapters/backburner.rb
blob: 7271d50a45db1ef34acf5df8c833e7b755d1b890 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module BackburnerJobsManager
  def clear_jobs
    Backburner::Worker.connection.tubes.all.map &:clear
  end

  def start_workers
    @thread = Thread.new { Backburner.work "active-jobs-default" }
  end

  def stop_workers
    @thread.kill
  end

end