capdrupal
capdrupal copied to clipboard
Fix wrong role(s) used on permissions/cleanup tasks
💬 Describe the bug
Most of the task must run on the app
permission. This is important to use the proper permission especially for people using a multiserver loadbalancing. Where some command should be run only on 1 server to avoid File Stale issues (cleanup drush cr on shared files for example on 2 servers at the same time).
To avoid many of those probleme, we should fix the permissions/cleanup tasks where we use app
instead of web
- especially on the release
cleanup fodler. As those directories are created on all mirror-server and therefore should be fixed on all server - not only `app.
desc 'Set cleanup permissions to allow deletion of releases'
task :cleanup do
- on roles(:app) do
+ on roles(:web) do
releases = capture(:ls, '-x', releases_path).split
valid, invalid = releases.partition { |e| /^\d{14}$/ =~ e }