mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-14 11:20:53 +08:00
fix: remove dependency on job_batches table for batch email sending
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Services\MailService;
|
||||
use Illuminate\Bus\Batchable;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
@@ -12,7 +11,7 @@ use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class SendEmailJob implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, Batchable;
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
protected $params;
|
||||
|
||||
public $tries = 3;
|
||||
@@ -36,7 +35,7 @@ class SendEmailJob implements ShouldQueue
|
||||
public function handle()
|
||||
{
|
||||
$mailLog = MailService::sendEmail($this->params);
|
||||
if($mailLog['error']){
|
||||
if ($mailLog['error']) {
|
||||
$this->release(); //发送失败将触发重试
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user