Skip to content

Instantly share code, notes, and snippets.

@bleonard
Last active April 14, 2017 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bleonard/ff5bb6b41531585d1017d54065477816 to your computer and use it in GitHub Desktop.
Save bleonard/ff5bb6b41531585d1017d54065477816 to your computer and use it in GitHub Desktop.
require 'resque/tasks'
require 'resque_scheduler/tasks'
require "resque_bus/tasks"
namespace :resque do
task :setup => [:environment] do
require 'resque_scheduler'
require 'resque/scheduler'
require 'tresque'
end
task :queues => [:setup] do
queues = ::TResque::Registry.queues
ENV["QUEUES"] = queues.join(",")
puts "TResque: #{ENV["QUEUES"]}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment