From 91d91aabaca518f5f8c95dde8aced55f5a6f981e Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 10:42:21 -0700 Subject: [PATCH 01/18] Change to specific source format --- Gemfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index be0d320e..8f94709b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,9 @@ -source "https://rubygems.org" +source 'https://rubygems.org' do + gem 'rake' -gem "rake" + gemspec -gemspec - -group :test do - gem 'minitest', '~> 5.5.1' + group :test do + gem 'minitest', '~> 5.5.1' + end end From 50817b6c3443a92a467569e3f9efbafce1791eff Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 11:00:55 -0700 Subject: [PATCH 02/18] Update minitest, add xml reporters, setup basic circleci config (travis is just so slow) --- .circleci/config.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + Gemfile | 3 ++- test/helper.rb | 8 ++++++++ 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..c6701fb0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,49 @@ +version: 2 + +jobs: + test_ruby_2_5_4: + environment: + QC_DATABASE_URL: postgres://postgres@localhost/queue_classic_test + QC_BENCHMARK: true + QC_BENCHMARK_MAX_TIME_DEQUEUE: 60 + docker: + - image: circleci/ruby:2.5.4 + environment: + RAILS_ENV: test + RACK_ENV: test + - image: circleci/postgres:9.5.18-alpine + steps: + - checkout + - run: + name: Install env dependencies + command: | + sudo apt-get update + sudo apt-get install postgresql-client + - restore_cache: + key: v1-qc-bundler-{{ $CIRCLE_JOB }}-{{ checksum "Gemfile.lock" }} + - run: + name: Install Ruby gems + command: | + bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 --no-document + - save_cache: + key: v1-qc-bundler-{{ $CIRCLE_JOB }}-{{ checksum "Gemfile.lock" }} + paths: + - ~/project/vendor/bundle + - run: + name: Create database + command: | + psql -c 'create database queue_classic_test;' -U postgres + - run: + name: Minitest + command: | + bundle exec rake + - store_artifacts: + path: test/reports/ + - store_test_results: + path: test/reports/ + +workflows: + version: 2 + test: + jobs: + - test_ruby_2_5_4 diff --git a/.gitignore b/.gitignore index 82ea97f7..75da5048 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ etc/ .env Gemfile.lock tips-and-tricks.md +test/reports/ diff --git a/Gemfile b/Gemfile index 8f94709b..106081ac 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ source 'https://rubygems.org' do gemspec group :test do - gem 'minitest', '~> 5.5.1' + gem 'minitest', '~> 5.8' + gem 'minitest-reporters' end end diff --git a/test/helper.rb b/test/helper.rb index 7a581f4a..96f221a3 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,6 +1,14 @@ require "bundler" +require "minitest/reporters" + Bundler.setup :default, :test +if ENV['CIRCLECI'] == "true" + Minitest::Reporters.use! Minitest::Reporters::JUnitReporter.new +else + Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new +end + ENV["DATABASE_URL"] ||= "postgres:///queue_classic_test" require_relative '../lib/queue_classic' From 8b21a5e5acef88af1a19d5c14075da79c2daef40 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 11:02:05 -0700 Subject: [PATCH 03/18] Trigger Circle on this branch From af4b688bb73544a3cf20d89eebe60fd72cb3f332 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 11:04:01 -0700 Subject: [PATCH 04/18] Remove errant flag from bundler --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c6701fb0..7c5b711f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,7 +24,7 @@ jobs: - run: name: Install Ruby gems command: | - bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 --no-document + bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 - save_cache: key: v1-qc-bundler-{{ $CIRCLE_JOB }}-{{ checksum "Gemfile.lock" }} paths: From 4aaf8bdc05144c79069516d65dd78ff45bdd0020 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 11:05:15 -0700 Subject: [PATCH 05/18] Remove cache-key for the job, will figure this out later --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c5b711f..78584c11 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,13 +20,13 @@ jobs: sudo apt-get update sudo apt-get install postgresql-client - restore_cache: - key: v1-qc-bundler-{{ $CIRCLE_JOB }}-{{ checksum "Gemfile.lock" }} + key: v1-qc-bundler-{{ checksum "Gemfile.lock" }} - run: name: Install Ruby gems command: | bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 - save_cache: - key: v1-qc-bundler-{{ $CIRCLE_JOB }}-{{ checksum "Gemfile.lock" }} + key: v1-qc-bundler-{{ checksum "Gemfile.lock" }} paths: - ~/project/vendor/bundle - run: From 4f6a15c937290e7e3e7e1751b35d26f0436943bf Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 11:12:17 -0700 Subject: [PATCH 06/18] Update docs, remove travis config --- .travis.yml | 16 ---------------- README.md | 14 ++++++-------- changelog | 1 + 3 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 688fdd38..00000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: ruby -before_install: - - gem update bundler --no-document -before_script: - - psql -c 'create database queue_classic_test;' -U postgres -env: - global: - - QC_DATABASE_URL="postgres://postgres@localhost/queue_classic_test" - - QC_BENCHMARK=true - - QC_BENCHMARK_MAX_TIME_DEQUEUE=60 -rvm: - - 2.6.3 - - 2.5.5 - - 2.4.6 -addons: - postgresql: 9.3 diff --git a/README.md b/README.md index 5a4d7d73..9f0d021a 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ # queue_classic +A simple, efficient worker queue for Ruby & PostgreSQL -

- Simple, efficient worker queue for Ruby & PostgreSQL -
- - +[![CircleCI](https://circleci.com/gh/QueueClassic/queue_classic/tree/master.svg?style=svg)](https://circleci.com/gh/QueueClassic/queue_classic/tree/master) - Gem Version -

+[![Code Climate](http://img.shields.io/codeclimate/github/QueueClassic/queue_classic.svg?style=flat)](https://codeclimate.com/github/QueueClassic/queue_classic) + +[![Gem Version](http://img.shields.io/gem/v/queue_classic.svg?style=flat)](http://badge.fury.io/rb/queue_classic) **IMPORTANT NOTE REGARDING VERSIONS** @@ -35,7 +33,7 @@ queue_classic provides a simple interface to a PostgreSQL-backed message queue. ## Table of content -* [Documentation](http://rubydoc.info/gems/queue_classic/2.2.3/frames) +* [Documentation](https://www.rubydoc.info/gems/queue_classic/) * [Usage](#usage) * [Setup](#setup) * [Upgrade from earlier versions to V3.1](#upgrade-from-earlier-versions) diff --git a/changelog b/changelog index 3e8627e2..2f7c7291 100644 --- a/changelog +++ b/changelog @@ -4,6 +4,7 @@ Unreleased - `enqueue`, `enqueue_at`, `enqueue_in` return job hash with id. - Fixed unlock query for versions below Postgres 9.2 - Change ruby versions tested in Travis to currently supported ones. +- Switched project to use CircleCI, as it's way more consistent speed wise Version 3.0.0rc - Improved signal handling From 315a107bd4768cad8e78fdea9fec56c367549396 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 11:15:20 -0700 Subject: [PATCH 07/18] Try different db config --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 78584c11..60674847 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 jobs: test_ruby_2_5_4: environment: - QC_DATABASE_URL: postgres://postgres@localhost/queue_classic_test + QC_DATABASE_URL: postgres://root@localhost/circle_test QC_BENCHMARK: true QC_BENCHMARK_MAX_TIME_DEQUEUE: 60 docker: @@ -11,7 +11,7 @@ jobs: environment: RAILS_ENV: test RACK_ENV: test - - image: circleci/postgres:9.5.18-alpine + - image: circleci/postgres:9.6.6-alpine steps: - checkout - run: @@ -32,7 +32,7 @@ jobs: - run: name: Create database command: | - psql -c 'create database queue_classic_test;' -U postgres + psql -c 'create database circle_test;' -U postgres - run: name: Minitest command: | From 677c24639430b29d0a2d3323dd23f8b9f12b7372 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 11:16:25 -0700 Subject: [PATCH 08/18] We don't have a gemfile lock, ewps --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 60674847..5970637e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,13 +20,13 @@ jobs: sudo apt-get update sudo apt-get install postgresql-client - restore_cache: - key: v1-qc-bundler-{{ checksum "Gemfile.lock" }} + key: v1-qc-bundler-{{ checksum "Gemfile" }} - run: name: Install Ruby gems command: | bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 - save_cache: - key: v1-qc-bundler-{{ checksum "Gemfile.lock" }} + key: v1-qc-bundler-{{ checksum "Gemfile" }} paths: - ~/project/vendor/bundle - run: From 9aa8ffc4b3e18a4501691b6069ce6e30bd5a34f1 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 11:23:29 -0700 Subject: [PATCH 09/18] More work on pg starting --- .circleci/config.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5970637e..0bdd1bd2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 jobs: test_ruby_2_5_4: environment: - QC_DATABASE_URL: postgres://root@localhost/circle_test + QC_DATABASE_URL: postgres://postgres@127.0.0.1/queue_classic_test QC_BENCHMARK: true QC_BENCHMARK_MAX_TIME_DEQUEUE: 60 docker: @@ -12,6 +12,9 @@ jobs: RAILS_ENV: test RACK_ENV: test - image: circleci/postgres:9.6.6-alpine + environment: + POSTGRES_USER: postgres + POSTGRES_DB: queue_classic_test steps: - checkout - run: @@ -20,13 +23,13 @@ jobs: sudo apt-get update sudo apt-get install postgresql-client - restore_cache: - key: v1-qc-bundler-{{ checksum "Gemfile" }} + key: v1-qc-bundler-{{ checksum "Gemfile" }}-{{ checksum "queue_classic.gemspec" }} - run: name: Install Ruby gems command: | bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 - save_cache: - key: v1-qc-bundler-{{ checksum "Gemfile" }} + key: v1-qc-bundler-{{ checksum "Gemfile" }}-{{ checksum "queue_classic.gemspec" }} paths: - ~/project/vendor/bundle - run: From 049318bdeb848d681d91208f8d717012d51229e2 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 11:27:58 -0700 Subject: [PATCH 10/18] Update to 2.1 / parallel 2 --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0bdd1bd2..b22c0a0c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,8 @@ -version: 2 +version: 2.1 jobs: test_ruby_2_5_4: + parallelism: 2 environment: QC_DATABASE_URL: postgres://postgres@127.0.0.1/queue_classic_test QC_BENCHMARK: true From 580f88e77eb0a3d4f7d4736b75e090bba3147c17 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 12:32:02 -0700 Subject: [PATCH 11/18] Set the PG_HOST --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b22c0a0c..588d985a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,6 +12,7 @@ jobs: environment: RAILS_ENV: test RACK_ENV: test + PGHOST: 127.0.0.1 - image: circleci/postgres:9.6.6-alpine environment: POSTGRES_USER: postgres @@ -36,7 +37,7 @@ jobs: - run: name: Create database command: | - psql -c 'create database circle_test;' -U postgres + psql -h 127.0.0.1 -c 'create database circle_test;' -U postgres - run: name: Minitest command: | From 0ab0bdfc2433d305ee934d5a184a1933fe2acb54 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 12:36:00 -0700 Subject: [PATCH 12/18] Attempt fix for pg --- .circleci/config.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 588d985a..6d9dae0f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: test_ruby_2_5_4: parallelism: 2 environment: - QC_DATABASE_URL: postgres://postgres@127.0.0.1/queue_classic_test + QC_DATABASE_URL: postgres://root@127.0.0.1/circle_test QC_BENCHMARK: true QC_BENCHMARK_MAX_TIME_DEQUEUE: 60 docker: @@ -14,9 +14,6 @@ jobs: RACK_ENV: test PGHOST: 127.0.0.1 - image: circleci/postgres:9.6.6-alpine - environment: - POSTGRES_USER: postgres - POSTGRES_DB: queue_classic_test steps: - checkout - run: @@ -37,7 +34,7 @@ jobs: - run: name: Create database command: | - psql -h 127.0.0.1 -c 'create database circle_test;' -U postgres + psql -h 127.0.0.1 -c 'create database circle_test;' -U root - run: name: Minitest command: | From b147b9a57b3d530e46f84721d673bd98affdbbee Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 12:37:03 -0700 Subject: [PATCH 13/18] Attempt fix for pg --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d9dae0f..0b907d97 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: test_ruby_2_5_4: parallelism: 2 environment: - QC_DATABASE_URL: postgres://root@127.0.0.1/circle_test + QC_DATABASE_URL: postgres://postgres@127.0.0.1/circle_test QC_BENCHMARK: true QC_BENCHMARK_MAX_TIME_DEQUEUE: 60 docker: @@ -34,7 +34,7 @@ jobs: - run: name: Create database command: | - psql -h 127.0.0.1 -c 'create database circle_test;' -U root + psql -h 127.0.0.1 -c 'create database circle_test;' -U postgres - run: name: Minitest command: | From c702a95d2aaeda0497c396f790d7ae5aebb1c57f Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 12:37:38 -0700 Subject: [PATCH 14/18] Attempt fix for pg --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b907d97..42f10a9f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,10 +31,6 @@ jobs: key: v1-qc-bundler-{{ checksum "Gemfile" }}-{{ checksum "queue_classic.gemspec" }} paths: - ~/project/vendor/bundle - - run: - name: Create database - command: | - psql -h 127.0.0.1 -c 'create database circle_test;' -U postgres - run: name: Minitest command: | From 3f3791d1c876ed9ee4969a3cc7e27c2ee8a5228d Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 12:56:10 -0700 Subject: [PATCH 15/18] Attempt fix for pg --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 42f10a9f..2f86e399 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,16 +3,16 @@ version: 2.1 jobs: test_ruby_2_5_4: parallelism: 2 - environment: - QC_DATABASE_URL: postgres://postgres@127.0.0.1/circle_test - QC_BENCHMARK: true - QC_BENCHMARK_MAX_TIME_DEQUEUE: 60 docker: - image: circleci/ruby:2.5.4 environment: RAILS_ENV: test RACK_ENV: test + POSTGRES_USER: root PGHOST: 127.0.0.1 + QC_DATABASE_URL: postgres://postgres@127.0.0.1/circle_test + QC_BENCHMARK: true + QC_BENCHMARK_MAX_TIME_DEQUEUE: 60 - image: circleci/postgres:9.6.6-alpine steps: - checkout From 78728a353bd267ea21957548c0180e0043529b2c Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 13:13:35 -0700 Subject: [PATCH 16/18] Process the circle config --- .circleci/config.yml | 76 ++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2f86e399..6f6db233 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,47 +1,47 @@ -version: 2.1 - +version: 2 jobs: test_ruby_2_5_4: parallelism: 2 docker: - - image: circleci/ruby:2.5.4 - environment: - RAILS_ENV: test - RACK_ENV: test - POSTGRES_USER: root - PGHOST: 127.0.0.1 - QC_DATABASE_URL: postgres://postgres@127.0.0.1/circle_test - QC_BENCHMARK: true - QC_BENCHMARK_MAX_TIME_DEQUEUE: 60 - - image: circleci/postgres:9.6.6-alpine + - image: circleci/ruby:2.5.4 + environment: + RAILS_ENV: test + RACK_ENV: test + POSTGRES_USER: root + PGHOST: 127.0.0.1 + QC_DATABASE_URL: postgres://postgres@127.0.0.1/circle_test + QC_BENCHMARK: true + QC_BENCHMARK_MAX_TIME_DEQUEUE: 60 + - image: circleci/postgres:9.6.6-alpine steps: - - checkout - - run: - name: Install env dependencies - command: | - sudo apt-get update - sudo apt-get install postgresql-client - - restore_cache: - key: v1-qc-bundler-{{ checksum "Gemfile" }}-{{ checksum "queue_classic.gemspec" }} - - run: - name: Install Ruby gems - command: | - bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 - - save_cache: - key: v1-qc-bundler-{{ checksum "Gemfile" }}-{{ checksum "queue_classic.gemspec" }} - paths: - - ~/project/vendor/bundle - - run: - name: Minitest - command: | - bundle exec rake - - store_artifacts: - path: test/reports/ - - store_test_results: - path: test/reports/ - + - checkout + - run: + name: Install env dependencies + command: | + sudo apt-get update + sudo apt-get install postgresql-client + - restore_cache: + key: v1-qc-bundler-{{ checksum "Gemfile" }}-{{ checksum "queue_classic.gemspec" + }} + - run: + name: Install Ruby gems + command: | + bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 + - save_cache: + key: v1-qc-bundler-{{ checksum "Gemfile" }}-{{ checksum "queue_classic.gemspec" + }} + paths: + - ~/project/vendor/bundle + - run: + name: Minitest + command: | + bundle exec rake + - store_artifacts: + path: test/reports/ + - store_test_results: + path: test/reports/ workflows: version: 2 test: jobs: - - test_ruby_2_5_4 + - test_ruby_2_5_4 From 9750e76f0bb4df7463a956bbacb9fab120ee024a Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 14:56:32 -0700 Subject: [PATCH 17/18] Add DATABASE_URL --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6f6db233..4ab4efc0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,7 @@ jobs: RACK_ENV: test POSTGRES_USER: root PGHOST: 127.0.0.1 + DATABASE_URL: postgres://postgres@127.0.0.1/circle_test QC_DATABASE_URL: postgres://postgres@127.0.0.1/circle_test QC_BENCHMARK: true QC_BENCHMARK_MAX_TIME_DEQUEUE: 60 From 84c65615006b62e2a4a7f79075bcfb8634301051 Mon Sep 17 00:00:00 2001 From: Russell Smith Date: Wed, 3 Jul 2019 15:01:54 -0700 Subject: [PATCH 18/18] Remove old test --- test/worker_test.rb | 9 --------- 1 file changed, 9 deletions(-) diff --git a/test/worker_test.rb b/test/worker_test.rb index 50eca78a..45e34ba5 100644 --- a/test/worker_test.rb +++ b/test/worker_test.rb @@ -176,15 +176,6 @@ def test_work_with_more_complex_construct assert_equal(0, worker.failed_count) end - def test_init_worker_with_arg - with_database 'postgres:///invalid' do - conn = PG.connect(dbname: 'queue_classic_test') - QC::Worker.new connection: conn - - conn.close - end - end - def test_init_worker_with_database_url with_database ENV['DATABASE_URL'] || ENV['QC_DATABASE_URL'] do worker = QC::Worker.new