Skip to content

[19.0][FIX] edi_queue_oca: propagate failed jobs to exchanges#321

Open
yankinmax wants to merge 1 commit into
OCA:19.0from
camptocamp:fix-edi_queue_oca
Open

[19.0][FIX] edi_queue_oca: propagate failed jobs to exchanges#321
yankinmax wants to merge 1 commit into
OCA:19.0from
camptocamp:fix-edi_queue_oca

Conversation

@yankinmax

Copy link
Copy Markdown
Contributor

When an EDI queue job reached its maximum retries, only the queue job was marked as failed while the related exchange remained pending.

Propagate terminal send, receive, and process job failures to the corresponding exchange error state, including the exception message and traceback.

When an EDI queue job reached its maximum retries, only the queue job
was marked as failed while the related exchange remained pending.

Propagate terminal send, receive, and process job failures to the
corresponding exchange error state, including the exception message
and traceback.
@yankinmax

Copy link
Copy Markdown
Contributor Author

Hello @simahawk can you pls take a look?


def write(self, vals):
result = super().write(vals)
if vals.get("state") == "failed":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there’s an opportunity to create an "on-failure" hook in the queue_job module

https://github.com/OCA/queue/blob/19.0/queue_job/models/queue_job.py#L268


def write(self, vals):
result = super().write(vals)
if vals.get("state") == "failed":

@Ricardoalso Ricardoalso Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Direct SQL updates executed by the queue_job runner will bypass this logic https://github.com/OCA/queue/blob/19.0/queue_job/jobrunner/runner.py#L217

In the situation where the number of retries exceeds the maximum allowed, the job is marked as "failed" with the error "JobFoundDead."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants