<?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($bM44E, $OzAEo, $ZXYtd) { goto v6l7s; TDE17: $this->param = $OzAEo; goto ZYmod; ZYmod: $this->cacheSeconds = $ZXYtd; goto ZwdlK; v6l7s: $this->key = $bM44E; goto TDE17; ZwdlK: } public static function create($bM44E, $OzAEo, $ZXYtd) { goto I5AMh; QMzHi: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($kPI6X); goto u2r2I; YosEt: $kPI6X->onQueue('LazyValueJob'); goto QMzHi; I5AMh: $kPI6X = new LazyValueJob($bM44E, $OzAEo, $ZXYtd); goto YosEt; u2r2I: } public static function createRefresh($bM44E, $OzAEo, $ZXYtd) { goto QWIF8; oxO0r: $kPI6X->onQueue('LazyValueJobRefresh'); goto kUan8; QWIF8: $kPI6X = new LazyValueJob($bM44E, $OzAEo, $ZXYtd); goto oxO0r; kUan8: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($kPI6X); goto EMOd0; EMOd0: } public function handle() { goto I1ZQ4; aLojW: foreach ($kshcB as $k__h1) { $xiCdH = $k__h1 . '\\' . $this->key . 'Processor'; if (class_exists($xiCdH)) { goto rUip8; rUip8: $fWRMF = new $xiCdH(); goto RV_K9; RV_K9: $XVADv = $fWRMF->execute($this->param); goto l1f8A; l1f8A: $Cwn32 = true; goto VZtff; VZtff: } } goto ytAv_; syTLj: ModelUtil::update('lazy_value', array('key' => $this->key, 'param' => json_encode($this->param)), array('expire' => time() + $this->cacheSeconds, 'value' => json_encode($XVADv))); goto tSaNw; I1ZQ4: $aiKb9 = time(); goto lNTVn; BLltB: Logger::info('LazyValueJob', 'Result', $XVADv); goto syTLj; lNTVn: Logger::info('LazyValueJob', 'Start', array($this->key, $this->cacheSeconds, $this->param)); goto L5Bnh; L5Bnh: $kshcB = config('app.lazy_value_processor_roots', array()); goto Kk8xl; ytAv_: if (!$Cwn32) { throw new \Exception('LazyValueJob.Error : could not found processor ' . $this->key); } goto BLltB; Kk8xl: if (empty($kshcB)) { throw new \Exception('LazyValueJob.Error : you should define lazy_value_processor_roots in config/app.php file'); } goto Onefn; tSaNw: Logger::info('LazyValueJob', 'End'); goto dltrj; Onefn: $Cwn32 = false; goto aLojW; dltrj: } }