mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修改系统任务时间
This commit is contained in:
parent
8aec17e5ed
commit
31b8c89bfc
@ -68,7 +68,7 @@ class Listen extends Task
|
|||||||
$output->error("创建处理任务的子进程失败 --> [{$item['id']}] {$item['title']},{$e->getMessage()}");
|
$output->error("创建处理任务的子进程失败 --> [{$item['id']}] {$item['title']},{$e->getMessage()}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sleep(3);
|
sleep(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,9 @@ class Query extends Task
|
|||||||
protected function execute(Input $input, Output $output)
|
protected function execute(Input $input, Output $output)
|
||||||
{
|
{
|
||||||
$this->cmd = "{$this->bin} xtask:";
|
$this->cmd = "{$this->bin} xtask:";
|
||||||
foreach ($this->queryProcess() as $item) {
|
if (count($this->queryProcess()) < 1) {
|
||||||
|
$output->writeln('没有查询到相关任务进程');
|
||||||
|
} else foreach ($this->queryProcess() as $item) {
|
||||||
$output->writeln("{$item['pid']}\t'{$item['cmd']}'");
|
$output->writeln("{$item['pid']}\t'{$item['cmd']}'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,9 +85,10 @@ if (!function_exists('sysqueue')) {
|
|||||||
throw new \think\Exception('该任务已经创建,请耐心等待处理完成!');
|
throw new \think\Exception('该任务已经创建,请耐心等待处理完成!');
|
||||||
}
|
}
|
||||||
$result = Db::name('SystemQueue')->insert([
|
$result = Db::name('SystemQueue')->insert([
|
||||||
'title' => $title, 'preload' => $loade,
|
'title' => $title, 'preload' => $loade,
|
||||||
'data' => json_encode($data, JSON_UNESCAPED_UNICODE),
|
'data' => json_encode($data, JSON_UNESCAPED_UNICODE),
|
||||||
'time' => $later > 0 ? time() + $later : time(), 'double' => intval($double),
|
'time' => ($later > 0 ? time() + $later : time()) - 3,
|
||||||
|
'double' => intval($double),
|
||||||
]);
|
]);
|
||||||
return $result !== false;
|
return $result !== false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user