sul-dlss / SearchWorks

SearchWorks (Stanford University Libraries)
http://searchworks.stanford.edu
Other
48 stars 10 forks source link

Configure whenever_roles so cron jobs are installed where we expect them #4310

Closed corylown closed 2 months ago

corylown commented 2 months ago

Removing this db role from some of the searchworks webapp VMs had the side effect of revealing that we hadn't configured the whenever_roles. See the whenever docs: https://github.com/javan/whenever?tab=readme-ov-file#capistrano-roles:

However, if you want to restrict certain jobs to only run on subset of servers, you can add a roles: [...] argument to their definitions. Make sure to add that role to the whenever_roles list in your deploy.rb.

Turns out if you don't add the roles you're using the the whenever_roles list the cron jobs are added all of the VMs with the db role by default.

I think there's more cleanup we could do (I'll put up separate PRs for these), such as:

corylown commented 2 months ago

Closing this in favor of https://github.com/sul-dlss/SearchWorks/pull/4311