Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dbp-relay-core-bundle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Relay API Gateway
dbp-relay-core-bundle
Commits
119de45f
Commit
119de45f
authored
Nov 4, 2021
by
Reiter, Christoph
Browse files
Options
Downloads
Patches
Plain Diff
docs: add an example for supervisor
parent
be3f769f
No related branches found
No related tags found
No related merge requests found
Pipeline
#60138
passed
Nov 4, 2021
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/queue.md
+22
-2
22 additions, 2 deletions
docs/queue.md
with
22 additions
and
2 deletions
docs/queue.md
+
22
−
2
View file @
119de45f
...
@@ -39,6 +39,7 @@ Note:
...
@@ -39,6 +39,7 @@ Note:
*
You need to take care of restarting it automatically.
*
You need to take care of restarting it automatically.
*
Each active worker needs to have a unique name passed as the first argument
*
Each active worker needs to have a unique name passed as the first argument
which should stay the same across restarts.
## Restart the workers
## Restart the workers
...
@@ -52,5 +53,24 @@ After deployment run
...
@@ -52,5 +53,24 @@ After deployment run
This will signal the workers to exit after the current task, which means they
This will signal the workers to exit after the current task, which means they
will be restarted by supervisor and will run the newly deployed code.
will be restarted by supervisor and will run the newly deployed code.
Symfony recommends to use
[
Supervisor
](
http://supervisord.org/
)
to do this. You can use
Symfony
[
Supervisor configuration
](
https://symfony.com/doc/current/messenger.html#supervisor-configuration
)
to help you with the setup process.
[
recommends
](
https://symfony.com/doc/current/messenger.html#supervisor-configuration
)
\ No newline at end of file
to use
[
Supervisor
](
http://supervisord.org/
)
to do this.
```
bash
sudo
apt-get
install
supervisor
```
```
ini
;/etc/supervisor/conf.d/queue-worker.conf
[program:queue-work]
command
=
php /path/to/your/app/bin/console dbp:relay:queue:work "%(program_name)s_%(process_num)02d"
user
=
user
numprocs
=
2
startsecs
=
0
autostart
=
true
autorestart
=
true
process_name
=
%(program_name)s_%(process_num)02d
```
Change
`user`
to the Unix user on your server.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment