[Unit]
Description=RSS2 NER Worker - Extraccion de Entidades (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=NER_LANG=es
Environment=NER_BATCH=64
Environment=HF_HOME=/opt/rss2/hf_cache
ExecStart=/opt/rss2/venv/bin/python -m workers.ner_worker
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=rss2-ner

MemoryMax=2G
CPUQuota=200%

[Install]
WantedBy=multi-user.target
