Sha256: 1f04c922c98f338bdf6e4510cdc633dc7b03ae41b43a08b8d0aed00ba23b33e5

Contents?: true

Size: 612 Bytes

Versions: 2

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true

require 'sneakers/tasks'

task :environment

namespace :sneakers do
  desc 'Start work for ActiveJob only (set $WORKERS=AdvancedSneakersActiveJob::FooQueueConsumer for processing of :foo queue)'
  task :active_job do
    Rake::Task['environment'].invoke

    # Enforsing ActiveJob-only workers
    AdvancedSneakersActiveJob.configure { |c| c.activejob_workers_strategy = :only }

    Sneakers.configure(AdvancedSneakersActiveJob.config.sneakers)

    Sneakers.logger.level = Logger::INFO # debug logs are too noizy because of bunny

    Rake::Task['sneakers:run'].invoke
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
advanced-sneakers-activejob-0.2.2 lib/advanced_sneakers_activejob/tasks.rb
advanced-sneakers-activejob-0.2.1 lib/advanced_sneakers_activejob/tasks.rb