Skip to content

PostgreSQL adapter crashes worker after updating job status #17

@greyblake

Description

@greyblake

Hi!
First of all, thank you for the nice crate and amount of effort you put into it!

At the moment I am evaluating it for usage and building a prototype to see if it can serve our needs.
I run 1.0.0-beta with PostgreSQL adapter and ran into worker being crashed after a job is being processed successfully.

Starting worker...
START SendEmailJob: Hello World!!!!
FAILED SendEmailJob: Hello World!!!!


START SendEmailJob: Hello World!!!!
FINISHED SendEmailJob: Hello World!!!!

thread 'main' (2299142) panicked at /home/sergey/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/apalis-postgres-1.0.0-beta.1/src/ack.rs:151:58:
called `Result::unwrap()` on an `Err` value: RowNotFound
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

So the error originated in apalis-postgres/src/ack.rs#L151

Insights

apalis-postgres has 2 files that matches queries/task/lock_by_id.sql pattern:

The SQL in those files is different. I suspect SQLx is picking up a wrong file

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions