Skip to content
Discussion options

You must be logged in to vote

Any one looking for solution, can use this in job handle method:

error_reporting(-1);
        register_shutdown_function(function() use($purchaseOrderItemRepository, $logger) {
            $error = error_get_last();
            if (null !== $error) {
                logger()->info('Queue died with an error : '. json_encode($error));
                // write rollback here...
            }
        });

hope laravel will come up with nice way of handling this to get caught in the failed method.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Himakar-PV
Comment options

Comment options

You must be logged in to vote
2 replies
@denisdulici
Comment options

@Himakar-PV
Comment options

Answer selected by Himakar-PV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants