diff options
Diffstat (limited to 'test/support/integration/adapters/queue_classic.rb')
-rw-r--r-- | test/support/integration/adapters/queue_classic.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/support/integration/adapters/queue_classic.rb b/test/support/integration/adapters/queue_classic.rb new file mode 100644 index 0000000000..3b24eca5b9 --- /dev/null +++ b/test/support/integration/adapters/queue_classic.rb @@ -0,0 +1,21 @@ +module QC; WAIT_TIME = 0.5; end + +module QueueClassicJobsManager + def clear_jobs + # disabling this as it locks + # QC::Queue.new("active_jobs_default").delete_all + end + + def start_workers + @pid = fork do + QC::Conn.connection = QC::Conn.connect + worker = QC::Worker.new(q_name: 'active_jobs_default') + worker.start + end + end + + def stop_workers + Process.kill 'HUP', @pid + end +end + |