Skip to content

Commit

Permalink
Add info for messenger stop
Browse files Browse the repository at this point in the history
  • Loading branch information
Isengo1989 committed Dec 16, 2024
1 parent ce91303 commit 96e25ac
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,18 @@ After all the steps are done, Deployer will switch the symlinks destination to t

This task is defined in the `deploy:symlink` default job in the [`deploy.php`](deployment-with-deployer#deploy-php).

### 8. Stop workers (optional)

In a production environment, you often run workers in the background. Before deploying a new version, you should stop the workers to prevent them from processing outdated data.

Check warning on line 162 in guides/hosting/installation-updates/deployments/deployment-with-deployer.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/hosting/installation-updates/deployments/deployment-with-deployer.md#L162

File types are normally capitalized. (FILE_EXTENSIONS_CASE[1]) Suggestions: `PHP` URL: https://languagetool.org/insights/post/spelling-capital-letters/ Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1 Category: CASING
Raw output
guides/hosting/installation-updates/deployments/deployment-with-deployer.md:162:131: File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
 Suggestions: `PHP`
 URL: https://languagetool.org/insights/post/spelling-capital-letters/ 
 Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
 Category: CASING

```php
task('messenger:stop', function () {
if (has('previous_release')) {
run('{{bin/php}} {{previous_release}}/bin/console messenger:stop-workers');

Check warning on line 167 in guides/hosting/installation-updates/deployments/deployment-with-deployer.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/hosting/installation-updates/deployments/deployment-with-deployer.md#L167

Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
guides/hosting/installation-updates/deployments/deployment-with-deployer.md:167:30: Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION
}
})->desc('Stop workers');
```

## Deployer output

This is the output of `dep deploy env=prod`:
Expand Down Expand Up @@ -360,6 +372,12 @@ task('sw:health_checks', static function () {
run('cd {{release_path}} && bin/console system:check --context=pre_rollout');
});

task('messenger:stop-workers', function () {
if (has('previous_release')) {
run('{{bin/php}} {{previous_release}}/bin/console messenger:stop-workers');

Check warning on line 377 in guides/hosting/installation-updates/deployments/deployment-with-deployer.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/hosting/installation-updates/deployments/deployment-with-deployer.md#L377

Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
guides/hosting/installation-updates/deployments/deployment-with-deployer.md:377:6: Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION
}
})->desc('Stop workers');

desc('Deploys your project');
task('deploy', [
'deploy:prepare',
Expand All @@ -384,4 +402,5 @@ task('deploy:update_code')->setCallback(static function () {

after('deploy:failed', 'deploy:unlock');
after('deploy:symlink', 'cachetool:clear:opcache');
after('deploy:symlink', 'messenger:stop-workers');
```

0 comments on commit 96e25ac

Please sign in to comment.