Skip to content

Instantly share code, notes, and snippets.

View JeffLuckett's full-sized avatar

Jeff Luckett JeffLuckett

View GitHub Profile
back_ends:
delayed_job:
base_pool_workers: 0
base_pool_queues: nil
queue_pools:
- workers: <%= Integer(ENV['IOU_COPY_POOL_WORKERS'] || 1) %>
disabled: <%= ENV['IOU_COPY_POOL_DISABLE'] == 'true' %>
dj_opts:
queues:
- 'iou_copy'
# frozen_string_literal: true
namespace :jobs do
path = File.expand_path('../../../config/async_job_queues.yml.erb', __FILE__)
DJ_SETTINGS = YAML.safe_load(
ERB.new(File.new(path).read).result
).with_indifferent_access[:back_ends][:delayed_job]
def all_queues
DJ_SETTINGS[:queue_pools].reduce([]) do |queue_list, pool|