<?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($PeAfP, $FRVtF, $tYiXs) { goto ATRD1; ceqeA: $this->cacheSeconds = $tYiXs; goto vxNW6; ATRD1: $this->key = $PeAfP; goto XfeXp; XfeXp: $this->param = $FRVtF; goto ceqeA; vxNW6: } public static function create($PeAfP, $FRVtF, $tYiXs) { goto kGjKB; WUcNK: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($jm4we); goto bXyp7; S1EGD: $jm4we->onQueue('LazyValueJob'); goto WUcNK; kGjKB: $jm4we = new LazyValueJob($PeAfP, $FRVtF, $tYiXs); goto S1EGD; bXyp7: } public static function createRefresh($PeAfP, $FRVtF, $tYiXs) { goto v_KAi; pJHyX: $jm4we->onQueue('LazyValueJobRefresh'); goto Zu3gr; v_KAi: $jm4we = new LazyValueJob($PeAfP, $FRVtF, $tYiXs); goto pJHyX; Zu3gr: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($jm4we); goto EslG2; EslG2: } public function handle() { goto dDXuD; UJWG2: Logger::info('LazyValueJob', 'Result', $DiI0O); goto euBi5; h1DDb: Logger::info('LazyValueJob', 'End'); goto Uk3yQ; o85u7: if (empty($aZZOr)) { throw new \Exception('LazyValueJob.Error : you should define lazy_value_processor_roots in config/app.php file'); } goto WmuWw; HO7q1: Logger::info('LazyValueJob', 'Start', array($this->key, $this->cacheSeconds, $this->param)); goto EfN33; EfN33: $aZZOr = config('app.lazy_value_processor_roots', array()); goto o85u7; euBi5: ModelUtil::update('lazy_value', array('key' => $this->key, 'param' => json_encode($this->param)), array('expire' => time() + $this->cacheSeconds, 'value' => json_encode($DiI0O))); goto h1DDb; v5mMX: foreach ($aZZOr as $Gvg_q) { $uKAkP = $Gvg_q . '\\' . $this->key . 'Processor'; if (class_exists($uKAkP)) { goto y7fuy; U6XLT: $HWLeL = true; goto veT_B; y7fuy: $JyCdb = new $uKAkP(); goto yJLa2; yJLa2: $DiI0O = $JyCdb->execute($this->param); goto U6XLT; veT_B: } } goto vkFOO; vkFOO: if (!$HWLeL) { throw new \Exception('LazyValueJob.Error : could not found processor ' . $this->key); } goto UJWG2; WmuWw: $HWLeL = false; goto v5mMX; dDXuD: $YBZL9 = time(); goto HO7q1; Uk3yQ: } }