Sha256: 9626902e02f34bed734d41efcc8da50c312c5d93cc1fdd2a27579623f08cb219
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
# Allows us to test that we can find working jobs class OngoingJob def self.queue :quick end def self.perform sleep 5 end end class SomeJob def self.perform(_repo_id, _path) end end class SomeQuickJob < SomeJob @queue = :quick end class SomeIvarJob < SomeJob @queue = :ivar end class SomeSharedEnvJob < SomeJob def self.queue :shared_job end end class JobWithParams @queue = :quick def self.perform(*args) @args = args end end JobWithoutParams = Class.new(JobWithParams) module Foo class Bar def self.queue 'bar' end end end module Test RESQUE_SCHEDULE = { 'job_without_params' => { 'cron' => '* * * * *', 'class' => 'JobWithoutParams', 'args' => { 'host' => 'localhost' }, 'rails_env' => 'production' }, 'job_with_params' => { 'every' => '1m', 'class' => 'JobWithParams', 'args' => { 'host' => 'localhost' }, 'parameters' => { 'log_level' => { 'description' => 'The level of logging', 'default' => 'warn' } } } } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
resque-scheduler-web-0.0.1 | spec/support/test_jobs.rb |