[Unit]
Description=RSS2 Language Detection Worker (Python)
After=network.target postgresql.service
Requires=postgresql.service

[Service]
Type=simple
User=rss2
Group=rss2
WorkingDirectory=/opt/rss2/src
EnvironmentFile=/opt/rss2/.env
Environment=LANG_DETECT_SLEEP=60
Environment=LANG_DETECT_BATCH=1000
ExecStart=/opt/rss2/venv/bin/python -m workers.langdetect_worker
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=rss2-langdetect

MemoryMax=512M
CPUQuota=50%

[Install]
WantedBy=multi-user.target
