summaryrefslogtreecommitdiffstats
path: root/deploy/reel2bits-worker.service
blob: 1369be84097a0ae4e8e8d882220cd22a99886264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[Unit]
Description=reel2bits-worker
After=network.target
PartOf=reel2bits.target

[Service]
Type=simple
User=reel2bits
WorkingDirectory=/home/reel2bits/reel2bits/api
Environment="FLASK_ENV=production"
# Look at documentation for the configuration part
Environment="APP_SETTINGS='config.production_secret.Config'"
# Celery workers handle background tasks (such file imports or federation
# messaging). The more processes a worker gets, the more tasks
# can be processed in parallel. However, more processes also means
# a bigger memory footprint.
# By default, a worker will span a number of process equal to your number
# of CPUs. You can adjust this, by explicitly setting the --concurrency
# flag:
#   celery -A tasks.celery worker -l INFO --concurrency=4
ExecStart=/home/reel2bits/reel2bits/venv/bin/celery -A tasks.celery worker -l INFO
TimeoutSec=15
Restart=always

[Install]
WantedBy=multi-user.target