Skip to content

[5.6] Include job ID in the output of the queue:work Artisan command - #21204

Merged
taylorotwell merged 1 commit into
laravel:masterfrom
cwt137:jobIds
Sep 18, 2017
Merged

taylorotwell merged 1 commit into
laravel:masterfrom
cwt137:jobIds

Conversation

@cwt137

@cwt137 cwt137 commented Sep 15, 2017

Copy link
Copy Markdown
Contributor

Recently, when working on a project that required a queue, I was trying to debug my app and track down certain jobs. The queue:work Artisan command didn't print out the job id, so it was a little harder for me to figure out what was going on. This PR adds the job ID to the command. Currently the output of the queue:work command looks like this:

[2017-09-15 14:44:08] Processing: App\Jobs\FooBarJob
[2017-09-15 14:44:08] Processed:  App\Jobs\FooBarJob

With this PR, the output looks like this:

[2017-09-15 14:44:08][917] Processing: App\Jobs\FooBarJob
[2017-09-15 14:44:08][917] Processed:  App\Jobs\FooBarJob

Please note how the job ID is just after the timestamp. I made this PR against master because it might break some apps that parse the output of this command. For example, if you were using the grep functionality in Logstash. So it would be better to save it for Laravel 5.6.

@tillkruss tillkruss changed the title Include job ID in the output of the queue:work Artisan command [5.6] Include job ID in the output of the queue:work Artisan command Sep 15, 2017
@deleugpn

Copy link
Copy Markdown
Contributor

Looks fine to go to 5.5?

@Dylan-DPC-zz

Copy link
Copy Markdown

@deleugpn The command output will change on different minor releases. Not a good to thing. Better for 5.6

@taylorotwell
taylorotwell merged commit 5bfedaa into laravel:master Sep 18, 2017
@cwt137
cwt137 deleted the jobIds branch September 19, 2017 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants