Sha256: 226f3ed72c050473fb5d6403f7f0a6a352a694a8c67f9f67fdfd6af95cddd048
Contents?: true
Size: 770 Bytes
Versions: 5
Compression:
Stored size: 770 Bytes
Contents
# vim:fileencoding=utf-8 require 'json' require 'yaml' require 'resque' redis_env_var = ENV['REDIS_PROVIDER'] || 'REDIS_URL' Resque.redis = ENV[redis_env_var] || 'localhost:6379' require 'resque-scheduler' require 'resque/scheduler/server' schedule_yml = ENV['RESQUE_SCHEDULE_YML'] if schedule_yml if File.exist?(schedule_yml) Resque.schedule = YAML.load_file(schedule_yml) else Resque.schedule = YAML.load(schedule_yml) end end schedule_json = ENV['RESQUE_SCHEDULE_JSON'] if schedule_json if File.exist?(schedule_json) Resque.schedule = JSON.parse(File.read(schedule_json)) else Resque.schedule = JSON.parse(schedule_json) end end class Putter @queue = 'putting' def self.perform(*args) args.each { |arg| puts arg } end end
Version data entries
5 entries across 5 versions & 1 rubygems