travel/service/runtime/windows/start_monitor.php

26 lines
591 B
PHP

<?php
require_once __DIR__ . '/../../vendor/autoload.php';
use Workerman\Worker;
use Workerman\Connection\TcpConnection;
use Webman\Config;
use support\App;
ini_set('display_errors', 'on');
error_reporting(E_ALL);
if (is_callable('opcache_reset')) {
opcache_reset();
}
App::loadAllConfig(['route']);
worker_start('monitor', config('process')['monitor']);
if (DIRECTORY_SEPARATOR != "/") {
Worker::$logFile = config('server')['log_file'] ?? Worker::$logFile;
TcpConnection::$defaultMaxPackageSize = config('server')['max_package_size'] ?? 10*1024*1024;
}
Worker::runAll();