fix admin change password

This commit is contained in:
Tokumeikoi
2020-05-25 15:48:12 +08:00
parent 6e509dab73
commit dab9afca53
3 changed files with 55 additions and 2 deletions

View File

@ -0,0 +1,43 @@
<?php
namespace App\Jobs;
use App\Services\TelegramService;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class SendTelegramJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $telegramId;
protected $text;
public $tries = 3;
public $timeout = 5;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(int $telegramId, string $text)
{
$this->onQueue('send_telegram');
$this->telegramId = $telegramId;
$this->text = $text;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$telegramService = new TelegramService();
$telegramService->sendMessage($this->telegramId, $this->text, 'markdown');
}
}