123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- namespace App\Servers;
- use App\Jobs\BoadcastDetectionJob;
- use App\Jobs\BusinessFileJob;
- use App\Jobs\ContractCommonJob;
- use App\Jobs\CreatBothJob;
- use App\Jobs\MsgFileJob;
- use App\Jobs\VerificationLevelJob;
- 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');
- }
- /**
- * 双线关系绑定
- * @param $mId
- * @param $pId
- */
- function creatBothJob($mId,$pId){
- CreatBothJob::dispatch($mId,$pId)->delay(3)->onConnection('redis')->onQueue('creatBoth');
- }
- /**
- * 会员等级升级
- * @param $pIds
- */
- function verificationLevelJob($pIds){
- VerificationLevelJob::dispatch($pIds)->delay(3)->onConnection('redis')->onQueue('newLevel');
- }
- /**
- * 公排出局
- */
- function contractCommonJob(){
- ContractCommonJob::dispatch()->delay(3)->onConnection('redis')->onQueue('contractCommon');
- }
- }
|