<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\LazyValue; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Job\BaseJob; use Module\Vendor\Log\Logger; class LazyValueJob extends BaseJob { private $key; private $param; private $cacheSeconds; public function __construct($ySsOv, $mzzZ3, $rBEnt) { goto RtWMO; dgSqv: $this->param = $mzzZ3; goto HTdof; HTdof: $this->cacheSeconds = $rBEnt; goto nfkRn; RtWMO: $this->key = $ySsOv; goto dgSqv; nfkRn: } public static function create($ySsOv, $mzzZ3, $rBEnt) { goto a_33D; ueCJ1: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($sEf_e); goto RcQkp; hJ6Vj: $sEf_e->onQueue('LazyValueJob'); goto ueCJ1; a_33D: $sEf_e = new LazyValueJob($ySsOv, $mzzZ3, $rBEnt); goto hJ6Vj; RcQkp: } public static function createRefresh($ySsOv, $mzzZ3, $rBEnt) { goto P9JfE; P9JfE: $sEf_e = new LazyValueJob($ySsOv, $mzzZ3, $rBEnt); goto c7vir; c7vir: $sEf_e->onQueue('LazyValueJobRefresh'); goto zPgq0; zPgq0: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($sEf_e); goto GQVcv; GQVcv: } public function handle() { goto yAb7B; eEm5Z: Logger::info('LazyValueJob', 'End'); goto b1Yiz; DN8vn: if (!$Erl2j) { throw new \Exception('LazyValueJob.Error : could not found processor ' . $this->key); } goto lPnFt; asZgk: Logger::info('LazyValueJob', 'Start', array($this->key, $this->cacheSeconds, $this->param)); goto CqEt7; S8mty: if (empty($XB1JQ)) { throw new \Exception('LazyValueJob.Error : you should define lazy_value_processor_roots in config/app.php file'); } goto WASj_; lPnFt: Logger::info('LazyValueJob', 'Result', $sKrwM); goto QQxFx; QQxFx: ModelUtil::update('lazy_value', array('key' => $this->key, 'param' => json_encode($this->param)), array('expire' => time() + $this->cacheSeconds, 'value' => json_encode($sKrwM))); goto eEm5Z; yAb7B: $WN2sn = time(); goto asZgk; CqEt7: $XB1JQ = config('app.lazy_value_processor_roots', array()); goto S8mty; WASj_: $Erl2j = false; goto heRJ4; heRJ4: foreach ($XB1JQ as $QRwf2) { $zGAvh = $QRwf2 . '\\' . $this->key . 'Processor'; if (class_exists($zGAvh)) { goto HAZ87; KJCdq: $Erl2j = true; goto E01ay; HAZ87: $Z1ri9 = new $zGAvh(); goto RbJhN; RbJhN: $sKrwM = $Z1ri9->execute($this->param); goto KJCdq; E01ay: } } goto DN8vn; b1Yiz: } }