imTigger / laravel-job-status

Add ability to track Job progress, status and result dispatched to Queue.
MIT License
407 stars 60 forks source link

Undefined index: command #47

Closed mralston closed 4 years ago

mralston commented 4 years ago

Laravel version 5.3 & 6.9. laravel-job-status version: 0.2.2

I see the following occurring in the Laravel log file:

[2020-01-06 13:46:02] production.ERROR: Undefined index: command  
[2020-01-06 13:46:03] production.ERROR: Undefined index: command  
[2020-01-06 13:46:15] production.ERROR: Undefined index: command  
[2020-01-06 13:46:15] production.ERROR: Undefined index: command  

This happens when the queue processes an event with a ShouldQueue listener.

I'm not certain why laravel-job-status is being invoked in this situation (neither the event nor the listener have the Trackable trait.

Nevertheless, I tracked it down to the updateJobStatus() method in LaravelJobStatusServiceProvider.php.

Here's a screenshot of the error occurring whilst debugging in PHPStorm. Screenshot_2019-12-17_at_11 16 05

I gather that you're working on a rewrite at the moment and can see that the LaravelJobStatusServiceProvider.php code has changed significantly in GitHub from what I'm pulling down with Composer.

imTigger commented 4 years ago

Please test if it still happens in latest 1.1.0 version.

mralston commented 4 years ago

I've just looked through the logs on our production server, that message hasn't appeared in there for a while now.

We're still running v0.2.2, but we updated to Laravel 6 a couple of months ago. Presumably some part of that combination fixed it.

imTigger commented 4 years ago

I have some systems running on Laravel 5.8 + JobStatus 0.2., and Laravel 6 + JobStatus 1. Havn't tried Laravel 6 + JobStatus 0.2.* Please try the new version if problem persists.

mralston commented 4 years ago

I think it's fixed. Off to look at what goodies v1 has in store... :)