Queue::before(function (JobProcessing $event) {
$jsonpayload = $event->job->payload();
if ($jsonpayload['data']['commandName'] === 'AppJobsSendAlert') {
$data = unserialize($jsonpayload['data']['command']);
$user = DB::table('users')->where('id','=',$data->test->user_id)->first();
$pay = DB::table('donates')->where('user_id','=',$user->id)->where('status','=','0')->first();
if(!is_null($pay)) {
$event->job->release(Carbon::now()->addSeconds(60));
}
}
});