From d3a1a3f1d62897360435baebc336499b70be566f Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 2 Dec 2019 11:47:38 +0800 Subject: [PATCH] ComposerUpdate --- public/static/theme/css/console.custom.css | 35 +++++- .../static/theme/css/console.custom.css.map | 2 +- vendor/composer/ClassLoader.php | 8 +- vendor/composer/installed.json | 104 +++++++++--------- .../think-library/src/queue/ListenQueue.php | 1 - .../think-library/src/queue/WorkQueue.php | 61 ++++++---- 6 files changed, 125 insertions(+), 86 deletions(-) diff --git a/public/static/theme/css/console.custom.css b/public/static/theme/css/console.custom.css index 8cb201a00..1776694e4 100644 --- a/public/static/theme/css/console.custom.css +++ b/public/static/theme/css/console.custom.css @@ -1,6 +1,3 @@ -[data-tips-image] { - cursor: zoom-in !important; -} .notdata { padding: 15px; display: block; @@ -110,7 +107,7 @@ .hr-line-dashed { color: #fff; height: 1px; - margin: 20px 0; + margin: 15px 0; background-color: #fff; border-top: 1px dashed #e7eaec; } @@ -168,6 +165,33 @@ .font-s40 { font-size: 40px !important; } +.font-w1 { + font-weight: 100 !important; +} +.font-w2 { + font-weight: 200 !important; +} +.font-w3 { + font-weight: 300 !important; +} +.font-w4 { + font-weight: 400 !important; +} +.font-w5 { + font-weight: 500 !important; +} +.font-w6 { + font-weight: 600 !important; +} +.font-w7 { + font-weight: 700 !important; +} +.font-w8 { + font-weight: 800 !important; +} +.font-w9 { + font-weight: 900 !important; +} .padding-0 { padding: 0 !important; } @@ -499,4 +523,7 @@ background: #dcdcdc; border-color: #dcdcdc; } +[data-tips-image] { + cursor: zoom-in !important; +} /*# sourceMappingURL=console.custom.css.map */ \ No newline at end of file diff --git a/public/static/theme/css/console.custom.css.map b/public/static/theme/css/console.custom.css.map index 92299e2fd..3a4922607 100644 --- a/public/static/theme/css/console.custom.css.map +++ b/public/static/theme/css/console.custom.css.map @@ -1 +1 @@ -{"version":3,"sources":["console.custom.less"],"names":[],"mappings":"AAAA;EACE,eAAA;;AAGF;EACE,aAAA;EACA,cA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EACA,kBAAA;EACA,kBAAA;EACA,mBAAA;EACA,yBAAA;;;AAIF;EACE,aAAA;;AAGF;EACE,MAAA;EACA,WAAA;EACA,WAAA;EACA,WAAA;EACA,aAAA;EACA,eAAA;EACA,mBAAA;;;AAIF;EACE,aAAA;;AAGF;EACE,UAAA;EACA,WAAA;EACA,eAAA;EACA,qBAAA;EACA,gBAAgB,2CAAhB;EACA,sBAAA;;AAGF;EACE,iBAAA;;AADF,eAGE;EACE,WAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,iBAAA;EACA,8BAAA;;AAGF,eAAC,MAAO;EACN,eAAA;EACA,qBAAA;;AAEA,eAJD,MAAO,EAIL;EACC,WAAA;EACA,qBAAA;;;AAMN;EACE,iBAAA;;AADF,qBAGE;EACE,WAAA;EACA,cAAA;;AALJ,qBAQE;EACE,YAAA;EACA,qBAAA;EACA,SAAA;EACA,UAAA;;AAZJ,qBAQE,KAME;EACE,UAAA;EACA,qBAAA;;AAEA,qBAVJ,KAME,KAIG;EACC,UAAA;;AADF,qBAVJ,KAME,KAIG,OAGC;EACE,WAAA;EACA,kBAAA;EACA,kBAAA;EACA,mBAAA;;AAzBV,qBAQE,KAME,KAeE;AA7BN,qBAQE,KAME,KAeO;EACH,WAAA;EACA,WAAA;EACA,YAAA;EACA,yBAAA;EACA,qBAAA;EACA,iBAAA;EACA,kBAAA;EACA,iBAAA;;AArCR,qBAQE,KAME,KA0BE;EACE,mBAAA;EACA,eAAA;;AA1CR,qBAQE,KAME,KA+BE,IAAG;EACD,mBAAA;EACA,qBAAA","file":"console.custom.css"} \ No newline at end of file +{"version":3,"sources":["console.custom.less"],"names":[],"mappings":"AAAA;EACE,aAAA;EACA,cAAA;EACA,eAAA;EACA,kBAAA;EACA,iBAAA;EACA,mBAAA;EACA,yBAAA;EACA,yBAAA;EACA,0BAAA;;AAGF;EACE,iBAAA;EACA,qBAAA;EACA,sBAAA;EACA,yBAAA;;AAGF;EACE,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BD,OA6BE;EACC,mBAAA;;;AAON;EACE,WAAA;EACA,WAAA;EACA,aAAA;EACA,eAAA;EACA,kBAAA;EACA,kBAAA;EACA,mBAAA;EACA,yBAAA;;;AAIF;EACE,aAAA;;AAGF;EACE,MAAA;EACA,WAAA;EACA,WAAA;EACA,WAAA;EACA,aAAA;EACA,eAAA;EACA,mBAAA;;;AAIF;EACE,aAAA;;AAGF;EACE,UAAA;EACA,WAAA;EACA,eAAA;EACA,qBAAA;EACA,gBAAgB,2CAAhB;EACA,sBAAA;;AAGF;EACE,iBAAA;;AADF,eAGE;EACE,WAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,iBAAA;EACA,8BAAA;;AAGF,eAAC,MAAO;EACN,eAAA;EACA,qBAAA;;AAEA,eAJD,MAAO,EAIL;EACC,WAAA;EACA,qBAAA;;;AAMN;EACE,iBAAA;;AADF,qBAGE;EACE,WAAA;EACA,cAAA;;AALJ,qBAQE;EACE,YAAA;EACA,qBAAA;EACA,SAAA;EACA,UAAA;;AAZJ,qBAQE,KAME;EACE,UAAA;EACA,qBAAA;;AAEA,qBAVJ,KAME,KAIG;EACC,UAAA;;AADF,qBAVJ,KAME,KAIG,OAGC;EACE,WAAA;EACA,kBAAA;EACA,kBAAA;EACA,mBAAA;;AAzBV,qBAQE,KAME,KAeE;AA7BN,qBAQE,KAME,KAeO;EACH,WAAA;EACA,WAAA;EACA,YAAA;EACA,yBAAA;EACA,qBAAA;EACA,iBAAA;EACA,kBAAA;EACA,iBAAA;;AArCR,qBAQE,KAME,KA0BE;EACE,mBAAA;EACA,eAAA;;AA1CR,qBAQE,KAME,KA+BE,IAAG;EACD,mBAAA;EACA,qBAAA;;AAMR;EACE,eAAA","file":"console.custom.css"} \ No newline at end of file diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 2c72175e7..fce8549f0 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -279,7 +279,7 @@ class ClassLoader */ public function setApcuPrefix($apcuPrefix) { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; } /** @@ -377,11 +377,11 @@ class ClassLoader $subPath = $class; while (false !== $lastPos = strrpos($subPath, '\\')) { $subPath = substr($subPath, 0, $lastPos); - $search = $subPath.'\\'; + $search = $subPath . '\\'; if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { - $length = $this->prefixLengthsPsr4[$first][$search]; - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + if (file_exists($file = $dir . $pathEnd)) { return $file; } } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 02070bcde..da0f803f3 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -177,8 +177,8 @@ }, { "name": "symfony/options-resolver", - "version": "v3.4.35", - "version_normalized": "3.4.35.0", + "version": "v3.4.36", + "version_normalized": "3.4.36.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", @@ -394,6 +394,56 @@ "Ip2Region" ] }, + { + "name": "zoujingli/think-library", + "version": "v5.1.x-dev", + "version_normalized": "5.1.9999999.9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/zoujingli/ThinkLibrary.git", + "reference": "f9467058cbd283adf2ff97ec94713586162b83d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f9467058cbd283adf2ff97ec94713586162b83d9", + "reference": "f9467058cbd283adf2ff97ec94713586162b83d9", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "aliyuncs/oss-sdk-php": "^2.3", + "ext-curl": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-openssl": "*", + "php": ">=5.4", + "qiniu/php-sdk": "^7.2", + "topthink/framework": "5.1.*" + }, + "time": "2019-12-02T03:40:05+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/common.php" + ], + "psr-4": { + "library\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "ThinkPHP Basic Development Library", + "homepage": "http://framework.thinkadmin.top" + }, { "name": "zoujingli/wechat-developer", "version": "v1.2.15", @@ -516,55 +566,5 @@ "WeChatOpenDeveloper", "wechat" ] - }, - { - "name": "zoujingli/think-library", - "version": "v5.1.x-dev", - "version_normalized": "5.1.9999999.9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "378899fdcddb3d7217783ba3ea8f2eca1767df12" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/378899fdcddb3d7217783ba3ea8f2eca1767df12", - "reference": "378899fdcddb3d7217783ba3ea8f2eca1767df12", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "aliyuncs/oss-sdk-php": "^2.3", - "ext-curl": "*", - "ext-gd": "*", - "ext-iconv": "*", - "ext-json": "*", - "ext-openssl": "*", - "php": ">=5.4", - "qiniu/php-sdk": "^7.2", - "topthink/framework": "5.1.*" - }, - "time": "2019-11-30T05:43:13+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/common.php" - ], - "psr-4": { - "library\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "ThinkPHP Basic Development Library", - "homepage": "http://framework.thinkadmin.top" } ] diff --git a/vendor/zoujingli/think-library/src/queue/ListenQueue.php b/vendor/zoujingli/think-library/src/queue/ListenQueue.php index b0a932c65..1600a74b0 100644 --- a/vendor/zoujingli/think-library/src/queue/ListenQueue.php +++ b/vendor/zoujingli/think-library/src/queue/ListenQueue.php @@ -56,7 +56,6 @@ class ListenQueue extends Command while (true) { foreach (Db::name('SystemQueue')->where([['status', 'eq', '1'], ['time', '<=', time()]])->order('time asc')->select() as $item) { try { - Db::name('SystemQueue')->where(['id' => $item['id']])->update(['status' => '2', 'start_at' => date('Y-m-d H:i:s')]); if ($process->query($command = $process->think("xtask:_work {$item['id']} -"))) { $output->comment("正在执行 -> [{$item['id']}] {$item['title']}"); } else { diff --git a/vendor/zoujingli/think-library/src/queue/WorkQueue.php b/vendor/zoujingli/think-library/src/queue/WorkQueue.php index 5ee684684..7e0b0d3d1 100644 --- a/vendor/zoujingli/think-library/src/queue/WorkQueue.php +++ b/vendor/zoujingli/think-library/src/queue/WorkQueue.php @@ -63,38 +63,51 @@ class WorkQueue extends Command */ protected function execute(Input $input, Output $output) { - try { - $this->id = trim($input->getArgument('id')) ?: 0; - if (empty($this->id)) throw new Exception("执行任务需要指定任务编号!"); - $queue = Db::name('SystemQueue')->where(['id' => $this->id, 'status' => '2'])->find(); - if (empty($queue)) throw new Exception("执行任务{$this->id}的信息或状态异常!");; - // 设置进程标题 - if (($process = ProcessService::instance())->iswin() && function_exists('cli_set_process_title')) { - cli_set_process_title("ThinkAdmin {$process->version()} 执行任务 - {$queue['title']}"); - } - // 执行任务内容 - if (class_exists($queue['preload'])) { - if (method_exists($class = new $queue['preload'], 'execute')) { - $data = json_decode($queue['data'], true); - if (isset($class->jobid)) $class->jobid = $this->id; - if (isset($class->title)) $class->title = $queue['title']; - $this->update('3', $class->execute($input, $output, is_array($data) ? $data : [])); - } else { - throw new Exception("任务处理类 {$queue['preload']} 未定义 execute 入口!"); - } + $this->id = trim($input->getArgument('id')); + if (empty($this->id)) { + $this->output->error("执行任务需要指定任务编号!"); + } else try { + $queue = Db::name('SystemQueue')->where(['id' => $this->id, 'status' => '1'])->find(); + if (empty($queue)) { + // 这里不做任何处理(该任务可能在其它地方已经在执行) + $this->output->warning("执行任务{$this->id}的信息或状态异常!"); } else { - $attr = explode(' ', trim(preg_replace('|\s+|', ' ', $queue['command']))); - $this->update('3', Console::call(array_shift($attr), $attr, 'console')); + // 锁定任务状态 + Db::name('SystemQueue')->where(['id' => $queue['id']])->update(['status' => '2', 'start_at' => date('Y-m-d H:i:s')]); + // 设置进程标题 + if (($process = ProcessService::instance())->iswin() && function_exists('cli_set_process_title')) { + cli_set_process_title("ThinkAdmin {$process->version()} 执行任务 - {$queue['title']}"); + } + // 执行任务内容 + if (class_exists($queue['preload'])) { + // 自定义文件,支持返回消息(支持异常结束,异常码可选择 3|4 设置任务状态) + if (method_exists($class = new $queue['preload'], 'execute')) { + $data = json_decode($queue['data'], true); + if (isset($class->jobid)) $class->jobid = $this->id; + if (isset($class->title)) $class->title = $queue['title']; + $this->update('3', $class->execute($input, $output, is_array($data) ? $data : [])); + } else { + throw new Exception("任务处理类 {$queue['preload']} 未定义 execute 入口!"); + } + } else { + // 自定义指令,不支持返回消息(支持异常结束,异常码可选择 3|4 设置任务状态) + $attr = explode(' ', trim(preg_replace('|\s+|', ' ', $queue['command']))); + $this->update('3', Console::call(array_shift($attr), $attr, 'console')); + } } } catch (\Exception $e) { - $this->update('4', $e->getMessage()); + if (in_array($e->getCode(), ['3', '4'])) { + $this->update($e->getCode(), $e->getMessage()); + } else { + $this->update('4', $e->getMessage()); + } } } /** * 修改当前任务状态 - * @param integer $status 任务状态 - * @param string $message 消息内容 + * @param mixed $status 任务状态 + * @param mixed $message 消息内容 * @return boolean * @throws \think\Exception * @throws \think\exception\PDOException