Skip to content

Commit

Permalink
MSL-API restart handler: tweak for reliability
Browse files Browse the repository at this point in the history
The MSL-API restart handler worked unreliably because it hit race
conditions in Supervisorctl. Added sleep time between actions to
reduce the likelihood of such failures.
  • Loading branch information
stsnel committed Mar 28, 2024
1 parent bb12c4f commit 70a5371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/msl_api/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Call command, rather than module, because module doesn't work
# right on Ubuntu 20.04
- name: Restart Laravel Worker Process # noqa command-instead-of-module
ansible.builtin.command: supervisorctl restart laravel-worker:laravel-worker_00
ansible.builtin.shell: sleep 6 && supervisorctl stop laravel-worker:laravel-worker_00 && sleep 6 && supervisorctl start laravel-worker:laravel-worker_00

- name: Reload MSL-API configuration
ansible.builtin.command: /usr/bin/php8.0 artisan config:cache
Expand Down

0 comments on commit 70a5371

Please sign in to comment.