Top Level Namespace
Defined Under Namespace
Modules: Scheduler
Instance Method Summary collapse
-
#config ⇒ Object
Example configuration file for rails-scheduler gem.
Instance Method Details
#config ⇒ Object
Example configuration file for rails-scheduler gem.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/scheduler/templates/scheduler.rb', line 3 Scheduler.configure do |config| ## # Current running environment. # Defaults to 'test'. # # config.environment = 'test' ## # A path to Mongoid config file. # Defaults to Scheduler gem test Mongoid config. # # config.mongoid_config_file = File.join(Scheduler.root, "spec/mongoid.yml") ## # A path to a specific log file. # Defaults to STDOUT. # # config.log_file = STDOUT ## # A custom class to handle the execution of jobs. # This class must include Scheduler::Schedulable module # in order to work. # Defaults to ExampleSchedulableModel, which is a bare class that # just includes Scheduler::Schedulable module. # # config.job_class = ExampleSchedulableModel ## # How often the scheduler has to check for new jobs to run. # Defaults to 5 seconds. # # config.polling_interval = 5 ## # How many jobs can run at a given time. # Defaults to the minimum value between the number of the current # machine CPU cores or 24. # # config.max_concurrent_jobs = [ Etc.nprocessors, 24 ].min ## # Sets whether to perform jobs when in test or development env. # Usually jobs are performed only when a Scheduler::MainProcess is running. # But for convenience, you can set this parameter to true so you # don't need to keep a Scheduler::MainProcess running. # Defaults to false. # # config.perform_jobs_in_test_or_development = false end |