Skip to content

Commit bbae0b4

Browse files
authored
give systemd units usable defaults (#727)
1 parent 7f7976f commit bbae0b4

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

etc/systemd/system/patchman-celery-beat.service

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ After=network-online.target
77
Type=simple
88
User=patchman-celery
99
Group=patchman-celery
10+
Environment="REDIS_HOST=127.0.0.1"
11+
Environment="REDIS_PORT=6379"
1012
EnvironmentFile=/etc/patchman/celery.conf
1113
ExecStart=/usr/bin/celery \
12-
--broker redis://${REDIS_HOST:-127.0.0.1}:${REDIS_PORT:-6379}/0 \
14+
--broker redis://${REDIS_HOST}:${REDIS_PORT}/0 \
1315
--app patchman \
1416
beat \
1517
--loglevel info \

etc/systemd/system/patchman-celery-worker.service

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ After=network-online.target
77
Type=simple
88
User=patchman-celery
99
Group=patchman-celery
10+
Environment="REDIS_HOST=127.0.0.1"
11+
Environment="REDIS_PORT=6379"
12+
Environment="CELERY_POOL_TYPE=solo"
13+
Environment="CELERY_CONCURRENCY=1"
1014
EnvironmentFile=/etc/patchman/celery.conf
1115
ExecStart=/usr/bin/celery \
12-
--broker redis://${REDIS_HOST:-127.0.0.1}:${REDIS_PORT:-6379}/0 \
16+
--broker redis://${REDIS_HOST}:${REDIS_PORT}/0 \
1317
--app patchman \
1418
worker \
1519
--task-events \
16-
--pool ${CELERY_POOL_TYPE:-solo} \
17-
--concurrency ${CELERY_CONCURRENCY:-1} \
20+
--pool ${CELERY_POOL_TYPE} \
21+
--concurrency ${CELERY_CONCURRENCY} \
1822
--hostname patchman-celery-worker%i@%%h
1923

2024
[Install]

0 commit comments

Comments
 (0)