| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace App\Servers;
- use App\Jobs\BoadcastDetectionJob;
- use App\Jobs\BusinessFileJob;
- use App\Jobs\MsgFileJob;
- use App\Models\BlockItems;
- /**
- * Redis数据缓存类
- */
- class JobServer
- {
- static private $server = '';
- private function __construct()
- {
- }
- /**
- * 创建对象
- * @return JobServer
- */
- static function creatServer()
- {
- if (empty(self::$server)) {
- self::$server = new JobServer();
- }
- return self::$server;
- }
- /**
- * 任务图片处理
- * @param $blockItem
- * @return void
- */
- function broadcastDetectionJob(BlockItems $blockItem){
- BoadcastDetectionJob::dispatch($blockItem)->delay(3)->onConnection('redis')->onQueue('broadcastDetection');
- }
- }
|