1
0
Fork 0
forked from OpenNeo/impress

Attempt to fix scheduled public data export cron

This hasn't actually been running, and I'm finally looking into why!
I tested this by running `sudo -u impress COMMAND_GOES_HERE`, and found
that there were two errors: both the lack of `production.env` that I
had noticed and expected, but also that Ruby 3.3.0 wasn't in the `PATH`
value.

To fix this, I now pull in both `/etc/profile` and `~/.bash_profile`,
much like what happens automatically when we log into a shell as
`impress`, to get the environment set up! I haven't actually validated
that this Works, but I guess we'll see! I *could* change the cron
timing to some immediate time to try to watch it happen, but I'm not
invested enough right now, there's other things to do!
This commit is contained in:
Emi Matchu 2024-05-02 12:21:14 -07:00
parent 3d0c506370
commit 12764c44fc

View file

@ -444,7 +444,7 @@
weekday: "0" # Sunday
hour: "1" # 1:15am
minute: "15" # 1:15am
job: "cd /srv/impress/current && bin/rails public_data:commit[scheduled]"
job: "bash -c 'source /etc/profile && source ~/.bash_profile && cd /srv/impress/current && bin/rails public_data:commit[scheduled]'"
handlers:
- name: Reload nginx