You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.
Currently, Job Middleware has the WithoutOverlapping amongst some other middlewares. It would be useful to have something that would allow accessing important information from the job, like the name of the job that was called, and the attributes of the class.
This would mean that I could use middleware to Log all important information about a job and send those logs to other places, maybe using the Log support.
I tried writing something on my own, but it looks like the $job attribute you get in the middleware isn't very useful and can only be used to pass it to the callback amongst some information (doesn't have much information that is accessible).
<?php
namespace App\Jobs\Middleware;
class Log
{
/**
* Logs the job and its details before and after processing a job.
*
* @param mixed $job
* @param callable $next
* @return mixed
*/
public function handle($job, $next)
{
// $job isn't very useful here
}
}
Some useful attributes that can be made available on the job can be the name of the class, the payload the job was called with, etc.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, Job Middleware has the
WithoutOverlapping
amongst some other middlewares. It would be useful to have something that would allow accessing important information from the job, like the name of the job that was called, and the attributes of the class.This would mean that I could use middleware to Log all important information about a job and send those logs to other places, maybe using the Log support.
I tried writing something on my own, but it looks like the
$job
attribute you get in the middleware isn't very useful and can only be used to pass it to the callback amongst some information (doesn't have much information that is accessible).Some useful attributes that can be made available on the job can be the name of the class, the payload the job was called with, etc.
The text was updated successfully, but these errors were encountered: