[更新]修改系统列表

This commit is contained in:
Anyon 2019-08-13 18:58:53 +08:00
parent 185967ecb6
commit 9d6a82064d
10 changed files with 28 additions and 28 deletions

View File

@ -33,7 +33,7 @@ class Listen extends Task
*/
protected function configure()
{
$this->setName('xqueue:listen')->setDescription('启动监听异步任务守护主进程');
$this->setName('xqueue:listen')->setDescription('启动异步任务监听守护主进程');
}
/**
@ -62,11 +62,11 @@ class Listen extends Task
throw new Exception("该任务{$item['id']}的处理子进程已经存在");
} else {
$this->createProcess();
$output->comment(">>> 创建任务{$item['id']}的处理子进程成功");
$output->info(">>> 创建任务{$item['id']}的处理子进程成功");
}
} catch (Exception $e) {
Db::name('SystemQueue')->where(['id' => $item['id']])->update(['status' => '4', 'desc' => $e->getMessage()]);
$output->comment(">>> 创建任务{$item['id']}的处理进程失败,{$e->getMessage()}");
$output->error(">>> 创建任务{$item['id']}的处理进程失败,{$e->getMessage()}");
}
}
sleep(3);

View File

@ -31,7 +31,7 @@ class Query extends Task
*/
protected function configure()
{
$this->setName('xqueue:query')->setDescription('查询正在执行的进程PID信息');
$this->setName('xqueue:query')->setDescription('查询正在执行所有任务进程');
}
/**

View File

@ -44,13 +44,13 @@ class Start extends Task
{
$this->cmd = "{$this->bin} xqueue:listen";
if (($pid = $this->checkProcess()) > 0) {
$output->comment("异步任务监听主进程{$pid}已经启动!");
$output->writeln("异步任务监听主进程{$pid}已经启动!");
} else {
$this->createProcess();
if (($pid = $this->checkProcess()) > 0) {
$output->comment("异步任务监听主进程{$pid}启动成功!");
$output->info("异步任务监听主进程{$pid}启动成功!");
} else {
$output->comment('异步任务监听主进程创建失败!');
$output->error('异步任务监听主进程创建失败!');
}
}
}

View File

@ -43,9 +43,9 @@ class State extends Task
{
$this->cmd = "{$this->bin} xqueue:listen";
if (($pid = $this->checkProcess()) > 0) {
$output->comment(">>> 异步任务监听主进程{$pid}正在运行...");
$output->info(">>> 异步任务监听主进程{$pid}正在运行...");
} else {
$output->comment(">>> 异步任务监听主进程没有运行哦^.^");
$output->error(">>> 异步任务监听主进程没有运行哦^.^");
}
}
}

View File

@ -45,8 +45,8 @@ class Stop extends Task
$this->cmd = "{$this->bin} xqueue:";
foreach ($this->queryProcess() as $item) {
$this->closeProcess($item['pid']);
$output->comment(">>> 给进程{$item['pid']}发送结束指令成功");
$output->writeln(">>> 发送结束进程{$item['pid']}指令成功");
}
$output->comment(">>> 所有异步任务进程的结束指令发送成功");
$output->info(">>> 所有异步任务进程的结束指令发送成功");
}
}

View File

@ -49,7 +49,7 @@ class Work extends Task
protected function configure()
{
// 执行任务配置
$this->setName('xqueue:_work')->setDescription('启动指定独立执行的任务子进程');
$this->setName('xqueue:_work')->setDescription('启动执行单个指定任务子进程');
$this->addArgument('id', Argument::OPTIONAL, '指定任务ID');
}

View File

@ -14,8 +14,8 @@
// +----------------------------------------------------------------------
// 注册系统指令
use think\Console;
// use think\Console;
Console::addDefaultCommands([
'app\company\command\Subversion',
]);
// Console::addDefaultCommands([
// 'app\company\command\Subversion',
// ]);

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit96ca9a3ecaeb8d161a3f960f677b7485::getLoader();
return ComposerAutoloaderInit8d685cd2c09b7504d228a429250f6ce9::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit96ca9a3ecaeb8d161a3f960f677b7485
class ComposerAutoloaderInit8d685cd2c09b7504d228a429250f6ce9
{
private static $loader;
@ -19,15 +19,15 @@ class ComposerAutoloaderInit96ca9a3ecaeb8d161a3f960f677b7485
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit96ca9a3ecaeb8d161a3f960f677b7485', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit8d685cd2c09b7504d228a429250f6ce9', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit96ca9a3ecaeb8d161a3f960f677b7485', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit8d685cd2c09b7504d228a429250f6ce9', '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\ComposerStaticInit96ca9a3ecaeb8d161a3f960f677b7485::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit8d685cd2c09b7504d228a429250f6ce9::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@ -48,19 +48,19 @@ class ComposerAutoloaderInit96ca9a3ecaeb8d161a3f960f677b7485
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit96ca9a3ecaeb8d161a3f960f677b7485::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit8d685cd2c09b7504d228a429250f6ce9::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire96ca9a3ecaeb8d161a3f960f677b7485($fileIdentifier, $file);
composerRequire8d685cd2c09b7504d228a429250f6ce9($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire96ca9a3ecaeb8d161a3f960f677b7485($fileIdentifier, $file)
function composerRequire8d685cd2c09b7504d228a429250f6ce9($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit96ca9a3ecaeb8d161a3f960f677b7485
class ComposerStaticInit8d685cd2c09b7504d228a429250f6ce9
{
public static $files = array (
'841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php',
@ -347,9 +347,9 @@ class ComposerStaticInit96ca9a3ecaeb8d161a3f960f677b7485
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit96ca9a3ecaeb8d161a3f960f677b7485::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit96ca9a3ecaeb8d161a3f960f677b7485::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit96ca9a3ecaeb8d161a3f960f677b7485::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit8d685cd2c09b7504d228a429250f6ce9::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit8d685cd2c09b7504d228a429250f6ce9::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit8d685cd2c09b7504d228a429250f6ce9::$classMap;
}, null, ClassLoader::class);
}