Minor changes to mail:send and job:list rendering
This commit is contained in:
parent
2b2482ba71
commit
6e7e09ab50
@ -35,15 +35,14 @@ class JobList extends Command
|
|||||||
$lastq = $o->queue;
|
$lastq = $o->queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->info(sprintf('%s-%d: %s[%s] - %d tries (Created: %s,Timeout: %s,Next: %s)',
|
$this->info(sprintf('%s-%d: %s[%s] - %d/%d tries [Next:%s]%s',
|
||||||
$o->uuid,
|
$o->uuid,
|
||||||
$o->id,
|
$o->id,
|
||||||
$o->display_name,
|
$o->display_name,
|
||||||
$o->command->subject,
|
$o->command->subject,
|
||||||
$o->attempts,
|
$o->attempts,$o->maxTries,
|
||||||
$o->created_at,
|
$o->available_at ?: '-',
|
||||||
$o->retry_until ?: '-',
|
$o->attempts ? sprintf(' (Created:%s)',$o->created_at) : ''
|
||||||
$o->reserved_at ?: '-',
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,44 +2,23 @@
|
|||||||
|
|
||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use Illuminate\Bus\Queueable;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldBeUnique;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Repat\LaravelJobs\Job;
|
use Repat\LaravelJobs\Job;
|
||||||
|
|
||||||
use App\Models\Address;
|
use App\Models\Address;
|
||||||
|
|
||||||
class MailSend implements ShouldQueue
|
class MailSend #implements ShouldQueue
|
||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable;
|
||||||
|
|
||||||
private const LOGKEY = 'JCM';
|
private const LOGKEY = 'JCM';
|
||||||
|
|
||||||
private ?bool $crash;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bool $crash Send crash mail only
|
* @param bool $crash Send crash mail only
|
||||||
*/
|
*/
|
||||||
public function __construct(bool $crash=NULL)
|
public function __construct(private ?bool $crash=NULL) {}
|
||||||
{
|
|
||||||
$this->crash = $crash;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function __get($key): mixed
|
|
||||||
{
|
|
||||||
switch ($key) {
|
|
||||||
case 'subject':
|
|
||||||
return __METHOD__;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the job.
|
* Execute the job.
|
||||||
|
Loading…
Reference in New Issue
Block a user