Skip to content

Instantly share code, notes, and snippets.

@virbo
Created May 27, 2019 05:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virbo/af4693cf0755e550395633e9dd7d86ab to your computer and use it in GitHub Desktop.
Save virbo/af4693cf0755e550395633e9dd7d86ab to your computer and use it in GitHub Desktop.
Yii Queue Service Daemond
# Service worker Yii Queue
# Artikel: https://dutainformasi.net/2019/05/22/implementasi-yii2-queue
# Guide: https://github.com/yiisoft/yii-queue/blob/master/docs/guide/worker.md
# Author Yusuf Ayuba
[Unit]
Description=Yii Queue Worker
After=network.target
# Enable the following two lines only apply if your queue backend is mysql
# replace this with the service that powers your backend
# After=mysql.service
# Requires=mysql.service
[Service]
User=<replace with user>
Group=<replace with group user>
ExecStart=/usr/bin/php /<replace with folder yii>/yii queue/listen --verbose
Restart=on-failure
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment