Sha256: 4bc0ef94c320f05524fd894d066d8facb5601262eb0eb67b7c434e739b7edfdb

Contents?: true

Size: 471 Bytes

Versions: 3

Compression:

Stored size: 471 Bytes

Contents

namespace :jobs do
  require 'mail'

  desc "Start a new worker"
  task work: :environment do
    worker = Afterparty::Worker.new
    worker.consume_sync
  end

  # desc "Clear all jobs"
  # task clear: :environment do
  #   Rails.configuration.queue.clear
  # end

  desc "List Jobs"
  task list: :environment do
    jobs = Rails.configuration.queue.jobs
    puts "#{jobs.size} total jobs."
    jobs.each do |time, job|
      puts time
      puts job
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
afterparty-0.2.0 lib/tasks/tasks.rake
afterparty-0.1.1 lib/tasks/tasks.rake
afterparty-0.1.0 lib/tasks/tasks.rake