You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/30 14:04:25 UTC

[GitHub] [airflow] santosh-d3vpl3x edited a comment on pull request #17341: Add ExecStop to systemd service files.

santosh-d3vpl3x edited a comment on pull request #17341:
URL: https://github.com/apache/airflow/pull/17341#issuecomment-889913686


   To add to this, would it be a good idea to demonstrate use of multiple worker on same machine?
   **airflow-worker-queue1.service**
   ```
   [Unit]
   Description=Airflow celery worker daemon
   After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service
   Wants=postgresql.service mysql.service redis.service rabbitmq-server.service
   
   [Service]
   EnvironmentFile=/etc/sysconfig/airflow
   Environment=AIRFLOW__CELERY__WORKER_LOG_SERVER_PORT=8794
   User=airflow
   Group=airflow
   Type=simple
   ExecStart=/bin/airflow celery worker -q queue1 --pid /var/run/airflow/worker-queue1.pid
   ExecStop=/bin/airflow celery stop --pid /var/run/airflow/worker-queue1.pid
   Restart=on-failure
   RestartSec=10s
   
   [Install]
   WantedBy=multi-user.target
   ```
   
   **airflow-worker-queue2.service**
   ```
   [Unit]
   Description=Airflow celery worker daemon
   After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service
   Wants=postgresql.service mysql.service redis.service rabbitmq-server.service
   
   [Service]
   EnvironmentFile=/etc/sysconfig/airflow
   Environment=AIRFLOW__CELERY__WORKER_LOG_SERVER_PORT=8795
   User=airflow
   Group=airflow
   Type=simple
   ExecStart=/bin/airflow celery worker -q queue2 --pid /var/run/airflow/worker-queue2.pid
   ExecStop=/bin/airflow celery stop --pid /var/run/airflow/worker-queue2.pid
   Restart=on-failure
   RestartSec=10s
   
   [Install]
   WantedBy=multi-user.target
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org