pm2文档说有一个选项可以在如下配置文件中设置watch-delay
:
module.exports = {
apps: [{
script: "app.js",
watch: ["server", "client"],
// Delay between restart
watch_delay: 1000,
ignore_watch : ["node_modules", "client/img"],
}]
}
但它没有提到watch_delay
选项的时间单位。是ms
吗?有人知道时间单位是多少吗?如果是ms
,文档中是否有可以确认的地方?
watch_delay
值时间单位为毫秒。
更具体地说,pm2 --help
表示您可以添加--watch-delay 4
或--watch-delay 4000
,延迟4秒。