This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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| |