capistrano / capistrano/symfony

Symfony messenger stop workers

Open
#125 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
353
Forks
61
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am trying to include a tastk to restart symfony messenger once deployed the new code (https://symfony.com/doc/current/messenger.html#deploying-to-production)

But as this comment says (https://stackoverflow.com/questions/63508798/symfony-messenger-workers-do-not-stop-when-running-under-supervisor), the command must be executed in the "old" release path, not in the new release path

How can I execute the command in the previous release path?

I've created this task, but it is being executed in the new path:

```
namespace :deploy do
desc 'Restart messenger'
task :migrate do
on roles(:app) do
symfony_console('messenger:stop-workers')
end
end
end

before "symfony:cache:warmup", "deploy:migrate"
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the shown deploy:migrate task, its symfony_console('messenger:stop-workers') entry point, and the before 'symfony:cache:warmup' hook. Trace how the release path is selected at that hook; done means messenger:stop-workers runs from the previous release path during deployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby, symfony
Domain
devops, release
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.