Skip to content

protspace-prep: in-memory job registry loses live jobs on restart #270

Description

@tsenoner

Context

From the post-merge review of #248 (FASTA prep backend). Already noted as a known limitation in services/protspace-prep/README.md; filing to track.

JobRegistry state (_jobs, _subscribers, _tasks) is in-memory. On a container restart, job directories survive on the volume but _jobs is empty, so /api/prepare/{job_id}/bundle returns 404 for any pre-restart job until the sweeper reclaims the directory — and any in-flight job is silently lost (the client SSE just drops).

Impact

Low for the current MVP traffic, but a deploy/restart during active jobs gives users a confusing failure with no recovery path.

Options (roadmap)

  • Rehydrate _jobs from job_root on startup (at least mark completed bundles downloadable).
  • Or persist minimal job metadata (status, bundle path, ready_at) alongside each job dir.
  • Or accept and document, and drain before redeploy.

Refs

  • services/protspace-prep/src/protspace_prep/jobs.py
  • services/protspace-prep/README.md (Known limitations)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions