You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to Symfony 4.4 and migrating to v2 of this gem I was reviewing deploy logs and noticed that the symfony:cache:warmup task was running the SSH command itself multiple times per server. I deploy to 9 servers, and the command looks like it's running 81 times, 9 per server.
The symfony_console call in that task is wrapped in an on:
So it looks like it's saying "on each server, run the cache warmup command on each server". Am I misunderstanding this and I have a different issue? This explanation seems to fit the results I'm seeing.
The text was updated successfully, but these errors were encountered:
adfinlay
changed the title
Cache clear SSH commands being executed multiple times per host
Cache warmup SSH commands being executed multiple times per host
Aug 4, 2020
@kissifrot I think it would make more sense to revert the commit as opposed to removing the on from all of the places that symfony_console is called, as those make sense. IMO symfony_console is responsible for running the console and shouldn't concern itself with roles.
However, it would seem that "execute should be wrapped in an 'on' scope" so we may be stuck with removing the on scope from the call sites as your PR does.
csabavirag
added a commit
to unitedworldwrestling/capistrano-symfony
that referenced
this issue
Jan 18, 2021
After updating to Symfony 4.4 and migrating to v2 of this gem I was reviewing deploy logs and noticed that the
symfony:cache:warmup
task was running the SSH command itself multiple times per server. I deploy to 9 servers, and the command looks like it's running 81 times, 9 per server.The
symfony_console
call in that task is wrapped in anon
:https://github.com/capistrano/symfony/blob/master/lib/capistrano/tasks/symfony.rake#L31
Then the
symfony_console
function itself contains anotheron
:https://github.com/capistrano/symfony/blob/master/lib/capistrano/dsl/symfony.rb#L42
So it looks like it's saying "on each server, run the cache warmup command on each server". Am I misunderstanding this and I have a different issue? This explanation seems to fit the results I'm seeing.
The text was updated successfully, but these errors were encountered: