Skip to content

Instantly share code, notes, and snippets.

@nsanta
Created July 26, 2010 23:50
Show Gist options
  • Save nsanta/491467 to your computer and use it in GitHub Desktop.
Save nsanta/491467 to your computer and use it in GitHub Desktop.
require 'resque_scheduler'
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
rails_env = ENV['RAILS_ENV'] || 'development'
resque_config = YAML.load_file(rails_root + '/config/resque.yml')
Resque.redis = resque_config[rails_env]
Resque.schedule = YAML.load_file(File.join(File.dirname(__FILE__), '../resque_schedule.yml'))
Dir[File.join("app","jobs", "*.rb")].each {|file| require file }
class String
def present?
!(nil? || empty?)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment