modify
This commit is contained in:
@@ -33,6 +33,7 @@ class CrontabProcess extends Process
|
|||||||
*/
|
*/
|
||||||
public function onHandler(\Swoole\Process $process): void
|
public function onHandler(\Swoole\Process $process): void
|
||||||
{
|
{
|
||||||
|
Timer::set(['enable_coroutine' => false]);
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
$content = $process->read();
|
$content = $process->read();
|
||||||
@@ -92,7 +93,7 @@ class CrontabProcess extends Process
|
|||||||
/** @var Crontab $content */
|
/** @var Crontab $content */
|
||||||
$content = unserialize($content);
|
$content = unserialize($content);
|
||||||
$runTicker = function (Crontab $crontab) {
|
$runTicker = function (Crontab $crontab) {
|
||||||
$this->application->warning('execute crontab '.date('Y-m-d H:i:s'));
|
$this->application->warning('execute crontab ' . date('Y-m-d H:i:s'));
|
||||||
|
|
||||||
if (!file_exists(APP_PATH . 'runTicker.log')) {
|
if (!file_exists(APP_PATH . 'runTicker.log')) {
|
||||||
touch(APP_PATH . 'runTicker.log');
|
touch(APP_PATH . 'runTicker.log');
|
||||||
|
|||||||
Reference in New Issue
Block a user