Skip to content
This repository was archived by the owner on Jan 15, 2022. It is now read-only.
This repository was archived by the owner on Jan 15, 2022. It is now read-only.

How can I find out that the job ended with an error #17

@myavchik

Description

@myavchik

Hello.
How can I find out (or catch or log) that the job ended with an error.
The BaseTest check the same $this->assertNotEmpty($id); for both ("error job" and "success job")

I found an example in spiral/framework JobDispatcher.php:

        $consumer->serve(function (\Throwable $e = null) {
            if ($e !== null) {
                $this->handleException($e);
            }
            $this->finalizer->finalize(false);
        });

Is this the only way to catch it? Any other ways to catch it in "producers" ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions