This repository has been archived on 2026-11-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
videovault/app/worker.py
T
adminandClaude Opus 5 d209ccd8fe Arkivera VideoVault från laptop till SIAX-flottan
Kod från /home/simon/Documents/Default Project/videovault (Python: yt-dlp +
ffmpeg + SQLite FTS5 + Meilisearch + FastAPI). Runtime-data (.venv, data/,
watch/, *.db, meili-data) exkluderad. Utökad .gitignore (secrets/cookies/media),
referenskopior av systemd-user-units i deploy/systemd/, README-sektion
Driftsläge: appen saknar auth och får inte exponeras utan auth.

Ej deployad. Laptop-tjänsterna vv-web/vv-worker är avaktiverade.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 19:36:31 +02:00

29 lines
481 B
Python

import time
from . import config, db
from .pipeline import process_job, index_all
def run_once():
from .ingest import import_watch
index_all()
import_watch()
jobs = db.queued(limit=4)
if not jobs:
return 0
done = 0
for v in jobs:
process_job(v["id"])
done += 1
return done
def daemon():
index_all()
while True:
try:
run_once()
except Exception:
pass
time.sleep(5)