From e8d68e3b899172e86a708ae917706e0cd573d2d1 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Mon, 9 Dec 2019 17:16:11 +0100 Subject: [PATCH] Make whenever properly read the S3 bucket For unknown reasons the magic [Figaro](https://github.com/laserlemon/figaro) does to turn keys in `config/application.yml` into ENV vars that can be read through Ruby's `ENV[]` is not working in `config/schedule.rb`. As a result, the `db2fog` tasks are not translated into cron entries which led to not having automatic backups. --- config/schedule.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/schedule.rb b/config/schedule.rb index b1c5928aa9..373ee7c57d 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -13,11 +13,11 @@ job_type :enqueue_job, "cd :path; :environment_variable=:environment bundle exe every 1.day, at: '2:45am' do - rake 'db2fog:clean' if ENV['S3_BACKUPS_BUCKET'] + rake 'db2fog:clean' if app_config['S3_BACKUPS_BUCKET'] end every 4.hours do - rake 'db2fog:backup' if ENV['S3_BACKUPS_BUCKET'] + rake 'db2fog:backup' if app_config['S3_BACKUPS_BUCKET'] end every 5.minutes do