Files
openfoodnetwork/config/schedule.rb
Pau Perez 410e23085e Remove integrity check for deleted variants in OCs
We have no way to see the output of this weird RSpec integrity check
thus, it's pointless. It only adds unnecessary load the server.

However, the issue it checks seems to still be happening although
not very often. UK's server has 70 occurrences the last one being from
early 2019 while FR's server returns 10.
2019-09-06 10:30:26 +02:00

32 lines
981 B
Ruby

require 'whenever'
require 'yaml'
# Learn more: http://github.com/javan/whenever
app_config = YAML.load_file(File.join(__dir__, 'application.yml'))
env "MAILTO", app_config["SCHEDULE_NOTIFICATIONS"] if app_config["SCHEDULE_NOTIFICATIONS"]
# If we use -e with a file containing specs, rspec interprets it and filters out our examples
job_type :run_file, "cd :path; :environment_variable=:environment bundle exec script/rails runner :task :output"
job_type :enqueue_job, "cd :path; :environment_variable=:environment bundle exec script/enqueue :task :priority :output"
every 1.day, at: '01:00am' do
rake 'ofn:cache:check_products_integrity'
end
every 1.day, at: '2:45am' do
rake 'db2fog:clean' if ENV['S3_BACKUPS_BUCKET']
end
every 4.hours do
rake 'db2fog:backup' if ENV['S3_BACKUPS_BUCKET']
end
every 5.minutes do
enqueue_job 'HeartbeatJob', priority: 0
enqueue_job 'SubscriptionPlacementJob', priority: 0
enqueue_job 'SubscriptionConfirmJob', priority: 0
end