3.0 KiB
3.0 KiB
Wimby TubeSync TODO
These tasks track the operational fixes identified while processing the large TubeSync backlog.
Database and queue storage
-
Migrate the TubeSync Django database from SQLite to the existing MariaDB service.
- MariaDB endpoint:
192.168.1.3:3306fromnc-node1. - Current server: MariaDB 11.4.5,
utf8mb4. - Production database is
tubesyncwith dedicatedtubesync@192.168.1.21credentials. - Store the connection string outside Git and set
DATABASE_CONNECTION=mysql://...in deployment configuration. - Take a verified SQLite backup before migration.
- Test export/import and Django migrations before switching production.
- Verify row counts and application health after cutover.
- MariaDB endpoint:
-
Keep all persistent TubeSync runtime state off
nc-node1local ext4./config,/config/tasks,/config/cache, backups and secrets stay on/data(NFS)./downloadsstays on NFS.- Deno's transient compiler/module cache uses RAM via
DENO_DIR=/dev/shm/deno. - No TubeSync queue/cache/migration data is bind-mounted from local ext4.
Backlog cleanup
-
Collapse duplicate
download_media_metadatajobs conservatively.- Current snapshot: ~19.9k metadata jobs represent only ~2.2k unique media IDs.
- Keep at most one metadata job per media ID, preferring the highest-priority/latest viable task.
- Back up the Huey limited-queue DB before modifying it.
- Validate queue counts and sample task payloads before and after cleanup.
-
Prevent the metadata queue from accumulating duplicate work again.
- Review
remove_duplicatesbehavior for metadata scheduling. - Add a regression test covering repeated scheduling for the same media ID.
- Prefer deduplication at enqueue time rather than waiting until execution.
- Review
YouTube challenge handling
-
Start
bgutil-ytdlp-pot-providerandyt-cipherautomatically with TubeSync.- Both services currently exist in s6 but are not part of the active
userbundle. - Add the services to the appropriate s6 bundle/dependency graph in the fork.
- Add a container-level health/smoke check for their local endpoints.
- Verify yt-dlp no longer reports local provider 502 errors.
- Both services currently exist in s6 but are not part of the active
-
Improve resilience against YouTube bot/age checks.
- Decide whether to provide a maintained
cookies.txtor another supported authenticated extraction method. - Do not commit cookies or credentials to Git.
- Re-measure metadata failure rate after challenge-provider fixes first.
- Decide whether to provide a maintained
Throughput
-
Re-measure metadata throughput after database, queue, and provider fixes.
- Record successful metadata jobs/hour, failures/hour, median task duration, and queue depth.
- Confirm
database is lockedfailures are eliminated after MariaDB cutover.
-
Consider increasing limited-network metadata concurrency only after stability improves.
- Start with current worker count as baseline.
- Increase conservatively and watch YouTube throttling/bot checks, MariaDB load, CPU, and memory.
- Keep automatic media downloads below metadata priority.