Skip to content

Commit

Permalink
Handle errors before running callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
akadusei committed Nov 28, 2023
1 parent ed54907 commit f65569f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mel/task.cr
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ abstract class Mel::Task
do_after_dequeue(true)
end
rescue error
do_after_enqueue(false)
handle_error(error)
do_after_enqueue(false)
end

def key : String
Expand Down
2 changes: 1 addition & 1 deletion src/worker/task.cr
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ abstract class Mel::Task
do_after_dequeue(true)
end
rescue error
do_after_enqueue(false)
handle_error(error)
do_after_enqueue(false)
end

macro inherited
Expand Down

0 comments on commit f65569f

Please sign in to comment.