Job type don't have onFailure function

Created on 22 July 2025, 2 months ago

Queue backend has onFailure function
But Job type don's have onFailure function to handle some addtional logic when fail eventually after max tries.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡³China lawxen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @lawxen
  • Merge request !33Add onQueueFailure for JobType β†’ (Open) created by lawxen
  • Pipeline finished with Failed
    2 months ago
    Total: 164s
    #553586
  • Pipeline finished with Failed
    2 months ago
    Total: 282s
    #553588
  • πŸ‡¨πŸ‡³China lawxen

    Backup a patch for 8.x-1.4

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    I'm not sure this is necessary - if you really want to do that you could use the post process event and check the job state there. We don't have an onSuccess either.

    I think we need more justification with a real example use-case that couldn't be solved with an event listener.

  • πŸ‡¨πŸ‡³China lawxen

    Besides post process event, We can also check the job state on each job's process() function
    We must recalculate if it's the real end failure. There won't be any problem with the regular count calculation. But on exception/failure the recalculation may cause some bugs in an extremely complex queue system if the code is not rigorous.
    So we want to add an onFailure() function to avoid such risks and complexities.

Production build 0.71.5 2024