config/app.php 的debug => false,
config/process.php monitor下的reloadable=>false
每次更新代碼還是會(huì)自動(dòng)熱更新,請(qǐng)問有知道是什么環(huán)節(jié)出現(xiàn)問題了嗎
這里寫問題描述
php /www/wwwroot/webman/start.php start 啟動(dòng)代碼是這個(gè)
嘗試過 php /www/wwwroot/webman/start.php start --no-reload 熱更新依然會(huì)生效,無法關(guān)閉
process.php配置里 monitor.options.enable_file_monitor 控制熱更新
這樣設(shè)置還是會(huì)熱更新哎,好奇怪,而且看日志,記錄Workerman[start.php] start in DEBUG mode
可是app.php下的明明是 'debug' => false,
// File update detection and automatic reload
'monitor' => [
'handler' => app\process\Monitor::class,
'reloadable' => false,
'constructor' => [
// Monitor these directories
'monitorDir' => array_merge([
app_path(),
config_path(),
base_path() . '/process',
base_path() . '/support',
base_path() . '/resource',
base_path() . '/.env',
], glob(base_path() . '/plugin//app'), glob(base_path() . '/plugin//config'), glob(base_path() . '/plugin/*/api')),
// Files with these suffixes will be monitored
'monitorExtensions' => [
'php', 'html', 'htm', 'env'
],
'options' => [
'enable_file_monitor' => false,
'enable_memory_monitor' => DIRECTORY_SEPARATOR === '/',
]
]
]
workerman不加-d啟動(dòng)就是 Workerman[start.php] start in DEBUG mode 沒問題。
app.debug是用來控制webman業(yè)務(wù)出錯(cuò)時(shí)是否打印調(diào)用棧的。
熱更新問題自己到app/process/Monitor.php里定位下就出來了。