d860156b11
Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
629 B
JavaScript
26 lines
629 B
JavaScript
/**
|
|
* PM2 进程配置 — gold_monitor
|
|
* 端口默认 5800
|
|
*/
|
|
const path = require("path");
|
|
const root = path.resolve(__dirname, "..");
|
|
|
|
module.exports = {
|
|
apps: [
|
|
{
|
|
name: "gold_monitor",
|
|
cwd: root,
|
|
script: path.join(root, ".venv/bin/gunicorn"),
|
|
// threads 便于 SSE 长连接;timeout 拉长避免秒级推送被 worker 杀掉
|
|
args: "wsgi:app --bind 0.0.0.0:5800 --workers 2 --threads 8 --timeout 300 --keep-alive 5",
|
|
interpreter: "none",
|
|
autorestart: true,
|
|
max_restarts: 20,
|
|
min_uptime: "5s",
|
|
env: {
|
|
PYTHONUNBUFFERED: "1",
|
|
},
|
|
},
|
|
],
|
|
};
|