Skip to content

Panicked threads > 0 when a job fails to load #8

@sgrif

Description

@sgrif

Found when updating crates.io to de5d8bb. Loosely related to #7. The error occurs for us when we've set the database in read-only mode. We still want to return an error from run_all_pending_jobs, but if the job count was 0 to begin with, assert_no_failed_jobs should return successfully.

We also need to expose an API that folks can use to make sure there are no pending jobs in the DB. This is tricky, since we need this to work without SELECT FOR UPDATE (both in case it's unavailable, but also to make this safe to run inside a transaction), but we can't do SKIP LOCKED without it. I need to think that API through a bit more from a testing and monitoring production point of view.

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