GithubHelp home page GithubHelp logo

Comments (5)

jpcaparas avatar jpcaparas commented on July 19, 2024

Hi @ismaail,

Thanks for reaching out to me. A couple of questions:

Can you please paste the URL you've used to trigger that job?

Could you also change the method body from this:

    public function toMail($notifiable)
    {
        $entity = $this->getEntity();

        return (new MailMessage)
                    ->line(sprintf(
                        'Info about Star Wars entity [%1$s]', $entity['name'])
                    )
                    ->line(print_r($entity, true))
                    ->action('More details', $entity['url']);
    }

... to this:

    public function toMail($notifiable)
    {
        $entity = $this->getEntity();

        \Log::debug('Entity information', $entity);

        return (new MailMessage)
                    ->line(sprintf(
                        'Info about Star Wars entity [%1$s]', $entity['name'])
                    )
                    ->line(print_r($entity, true))
                    ->action('More details', $entity['url']);
    }

... and let me know what you're seeing after you run tail -f [app-path]/storage/logs/laravel.log

Thanks.

from laravel-horizon-demo.

jpcaparas avatar jpcaparas commented on July 19, 2024

Could you also do git pull so you have the latest commits, thanks.

from laravel-horizon-demo.

ismaail avatar ismaail commented on July 19, 2024

The url I use to create the jobs http://[app-host]/queues/fetch-star-wars-entity?repeat=10&user_id=1

The source of the problem is in the $response

sometimes the $response->status() is 404 and $response->json() has this array:

['detail' => 'Not found']

from laravel-horizon-demo.

jpcaparas avatar jpcaparas commented on July 19, 2024

@ismaail,

That might be either swapi.co or mailtrap.io throttling your request. Have you increased the number of spawned concurrent workers on the ./config/horizon.php file?

I'll push in a commit that throws an exception on a 404 response on both jobs. This exception should appear on the Horizon dashboard. I'll keep you posted.

Thanks,
JP

from laravel-horizon-demo.

ismaail avatar ismaail commented on July 19, 2024

I didn't change the file config/horizon.php.

for the emails, I used a Docker Mailcatcher.

I created a PR to check the response status code.

from laravel-horizon-demo.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.