mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
[更新]任务指令增加结束符,避免重复检查出错
This commit is contained in:
parent
b89781f8b5
commit
33e08fe564
@ -56,7 +56,7 @@ class Listen extends Task
|
||||
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')]);
|
||||
$this->cmd = "{$this->bin} xtask:_work {$item['id']}";
|
||||
$this->cmd = "{$this->bin} xtask:_work {$item['id']} -";
|
||||
if ($this->checkProcess()) {
|
||||
$output->comment("处理任务的子进程已经存在 --> [{$item['id']}] {$item['title']}");
|
||||
} else {
|
||||
|
@ -51,6 +51,7 @@ class Work extends Task
|
||||
// 执行任务配置
|
||||
$this->setName('xtask:_work')->setDescription('[执行]创建执行单个指定任务的进程');
|
||||
$this->addArgument('id', Argument::OPTIONAL, '指定任务ID');
|
||||
$this->addArgument('sp', Argument::OPTIONAL, '指令结束符');
|
||||
}
|
||||
|
||||
/**
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitfc0b7e90cab7332af0db11653021f1a3::getLoader();
|
||||
return ComposerAutoloaderInitf4a8ef0e9a37763a2e0caa5f75189947::getLoader();
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitfc0b7e90cab7332af0db11653021f1a3
|
||||
class ComposerAutoloaderInitf4a8ef0e9a37763a2e0caa5f75189947
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -19,15 +19,15 @@ class ComposerAutoloaderInitfc0b7e90cab7332af0db11653021f1a3
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitfc0b7e90cab7332af0db11653021f1a3', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitf4a8ef0e9a37763a2e0caa5f75189947', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitfc0b7e90cab7332af0db11653021f1a3', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitf4a8ef0e9a37763a2e0caa5f75189947', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require_once __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitfc0b7e90cab7332af0db11653021f1a3::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitf4a8ef0e9a37763a2e0caa5f75189947::getInitializer($loader));
|
||||
} else {
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
@ -48,19 +48,19 @@ class ComposerAutoloaderInitfc0b7e90cab7332af0db11653021f1a3
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitfc0b7e90cab7332af0db11653021f1a3::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitf4a8ef0e9a37763a2e0caa5f75189947::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequirefc0b7e90cab7332af0db11653021f1a3($fileIdentifier, $file);
|
||||
composerRequiref4a8ef0e9a37763a2e0caa5f75189947($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequirefc0b7e90cab7332af0db11653021f1a3($fileIdentifier, $file)
|
||||
function composerRequiref4a8ef0e9a37763a2e0caa5f75189947($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitfc0b7e90cab7332af0db11653021f1a3
|
||||
class ComposerStaticInitf4a8ef0e9a37763a2e0caa5f75189947
|
||||
{
|
||||
public static $files = array (
|
||||
'841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
|
||||
@ -314,9 +314,9 @@ class ComposerStaticInitfc0b7e90cab7332af0db11653021f1a3
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitfc0b7e90cab7332af0db11653021f1a3::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitfc0b7e90cab7332af0db11653021f1a3::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitfc0b7e90cab7332af0db11653021f1a3::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitf4a8ef0e9a37763a2e0caa5f75189947::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitf4a8ef0e9a37763a2e0caa5f75189947::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitf4a8ef0e9a37763a2e0caa5f75189947::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user