Skip to content

Commit

Permalink
settings scheduler (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkostin1966 committed Jun 14, 2019
1 parent 5341912 commit 92f5281
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/scheduler.rb
Expand Up @@ -5,7 +5,7 @@
# Do not schedule when Rails is run from its console, for a test/spec, or from a Rake task
# return if defined?(Rails::Console) || Rails.env.test? || File.split($0).last == 'rake'
# Do not schedule unless Rails is run in production mode.
return unless Rails.env.production?
return unless Rails.env.production? && Settings.scheduler.enabled

Rails.logger.info "Schedule Task #{Time.now}"

Expand Down
5 changes: 5 additions & 0 deletions config/settings.yml
Expand Up @@ -35,6 +35,11 @@ rails:
cable:
adapter: async

# These are keys used rufus scheduler (see: config/initializers/scheduler.rb)
scheduler:
enabled:
false

# These are keys used by application mailers
mailers:
to:
Expand Down

0 comments on commit 92f5281

Please sign in to comment.