Commit Graph

23 Commits

Author SHA1 Message Date
Georges-Antoine Assi
52940ea3d4 fix(launchbox): stop the cloud provider from silently matching nothing
LaunchBox cloud lookups read from a Redis store that only the metadata
update task fills, but nothing surfaced when that store was empty. The
provider reported healthy, every search returned zero results, and the
logs said nothing.

- heartbeat now reports unhealthy until the store is populated, and an
  empty store logs what to set to fix it
- the update task can be run manually whenever LAUNCHBOX_API_ENABLED is
  on, instead of also requiring the scheduled-update flag
- the ~600k entry dump was buffered into a single pipeline, peaking at
  1.7GB of RSS and writing nothing at all if the job was killed part way
  through. Writes now go out in batches and parsed elements are dropped
  as they are consumed, which caps the run at ~260MB. The task also gets
  its own timeout, since the default 5 minutes does not cover a 100MB
  download plus a 500MB parse
- alternate name lookups ignored the platform, so "Super Mario World" on
  PlayStation matched Super Mario Bros.
- Coleco ADAM was spelled wrong, and Famicom / Super Famicom pointed at
  platform names LaunchBox does not use

Fixes #3981

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 19:55:16 -04:00
Ryan McClelland
903df17f6e fix(scan): detect scans on every queue and entry point
Scan job discovery only looked at the high priority queue and only
recognised scan_platforms, so two kinds of in-flight scan went unseen.

Watcher scans are delayed through the scheduler and land in the low
priority queue, so the concurrency guard let a manual scan start
alongside one and the stop handler left it queued to run afterwards.

The scheduled rescan enqueues its own task and calls scan_platforms in
process, so the worker reports the task's name. That made stopping it a
silent no-op: with no running job matched, the stop flag it polls was
never set.

Discovery now spans both queues plus the scheduler and matches either
function name. The scheduler registry also holds the standing cron entry
for the scheduled rescan, which is a schedule rather than a pending
scan, so only delayed scan_platforms jobs count as queued.

Clearing the stop flag at scan start is now scoped to the scan that owns
it, so a scan starting next to one that has not yet polled the flag
cannot drop a stop request meant for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 12:47:31 -07:00
Georges-Antoine Assi
e6ddc5da11 bot attempt at save sync 2026-03-14 22:13:38 -04:00
Georges-Antoine Assi
743bddcb23 add valkey to pytest ci 2026-01-10 09:22:46 -05:00
Georges-Antoine Assi
38ce9897d4 [HOTFIX] Dont schedule tasks if already queued 2026-01-09 17:55:16 -05:00
Georges-Antoine Assi
b2dea510c4 [ROMM-2628] Fix desirialize job func_name 2025-11-10 17:57:28 -05:00
Georges-Antoine Assi
170b3d04b7 self cleanup from review 2025-10-16 15:17:14 -04:00
Georges-Antoine Assi
6785be06a9 cleanup code massively 2025-10-15 16:21:17 -04:00
Georges-Antoine Assi
e336fc3c5e restyle by bo 2025-10-15 10:59:02 -04:00
Georges-Antoine Assi
ff15cfcee6 support states for more types of tasks 2025-10-09 19:20:19 -04:00
Michael Manganiello
e4e3928d1b misc: Apply import sorting 2025-09-04 11:17:00 -03:00
Georges-Antoine Assi
9bb586b288 set timeouts 2025-08-26 21:09:13 -04:00
Michael Manganiello
637a0b74f7 misc: Add type hints to task classes
Small change including type hints for the Task base classes, and related
fixes to related tests.
2025-08-06 15:55:41 -03:00
Georges-Antoine Assi
8061db40b2 fix tests and cleanup 2025-08-02 17:55:43 -04:00
Georges-Antoine Assi
19c5b5e428 refactor tasks endpoint 2025-08-02 10:11:00 -04:00
Georges-Antoine Assi
7bde4aee70 complete the rst of the files 2024-12-20 23:45:25 -05:00
Michael Manganiello
aced1f1ff2 misc: Migrate IGDBBaseHandler to async
Convert `IGDBBaseHandler` methods to be asynchronous, and use an `httpx`
async client, instead of `requests` sync client.

This change also removes the direct dependency with `requests`, as the
project no longer uses it, preferring `httpx` instead.
2024-07-26 21:19:01 -03:00
Georges-Antoine Assi
2b60402a04 start fixing mypy issues 2024-05-21 19:22:14 -04:00
Georges-Antoine Assi
b2085f87a8 bunch of fixes for trunk 2024-05-21 17:10:11 -04:00
Georges-Antoine Assi
a7cf0d389a run trunk format on all files 2024-05-21 10:18:13 -04:00
Georges-Antoine Assi
efcd3c00d1 store swtich files in redis 2024-03-26 17:18:46 -04:00
Georges-Antoine Assi
6bcadec702 everything we need for 3.0 2024-02-01 18:13:16 -05:00
Zurdi
4b9e76f550 backend structure refactor 2024-01-12 23:44:27 +01:00