Add watch_imports command

This commit is contained in:
Joakim Hellsén 2026-03-09 05:27:11 +01:00
commit 44cd440a17
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
4 changed files with 355 additions and 15 deletions

View file

@ -1,12 +1,32 @@
[Unit]
Description=TTVDrops import drops from pending directory
Description=TTVDrops watch and import drops from pending directory
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
Type=simple
User=ttvdrops
Group=ttvdrops
WorkingDirectory=/home/ttvdrops/ttvdrops
EnvironmentFile=/home/ttvdrops/ttvdrops/.env
ExecStart=/usr/bin/uv run python manage.py better_import_drops /mnt/fourteen/Data/Responses/pending
-ExecStartPost=/usr/bin/uv run python manage.py download_box_art
-ExecStartPost=/usr/bin/uv run python manage.py download_campaign_images
ExecStart=/usr/bin/uv run python manage.py watch_imports /mnt/fourteen/Data/Responses/pending --verbose
# Restart policy
Restart=on-failure
RestartSec=5s
# Process management
KillMode=mixed
KillSignal=SIGTERM
# Resource limits
MemoryLimit=512M
CPUQuota=50%
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=ttvdrops-watch
[Install]
WantedBy=multi-user.target

View file

@ -1,10 +0,0 @@
[Unit]
Description=Frequent TTVDrops import drops timer
[Timer]
OnBootSec=0
OnUnitActiveSec=1min
Persistent=true
[Install]
WantedBy=timers.target