[Unit]
Description=RSS2 Cluster Worker - Agrupacion de noticias (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=EVENT_DIST_THRESHOLD=0.35
Environment=EMB_MODEL=sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
ExecStart=/opt/rss2/venv/bin/python -m workers.cluster_worker
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=rss2-cluster

MemoryMax=2G
CPUQuota=200%

[Install]
WantedBy=multi-user.target
