insurance-spider/ecosystem.config.cjs

102 lines
2.7 KiB
JavaScript

module.exports = {
apps: [
// 消息队列管理器(优先启动)
{
name: "msg-manager",
script: "./service/msgManager.js",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "200M",
env: {
NODE_ENV: "production",
SERVICE_NAME: "msg-manager",
},
error_file: "./logs/msg-manager-error.log",
out_file: "./logs/msg-manager-out.log",
log_file: "./logs/msg-manager-combined.log",
time: true,
},
{//中国人民保险爬虫
name: "picc-spider",
script: "./service/picc.js",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "300M",
env: {
NODE_ENV: "production",
SPIDER_NAME: "picc",
},
error_file: "./logs/picc-error.log",
out_file: "./logs/picc-out.log",
log_file: "./logs/picc-combined.log",
time: true,
},
{//太平洋保险爬虫
name: "cpic-spider",
script: "./service/cpic.js",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "300M",
env: {
NODE_ENV: "production",
SPIDER_NAME: "cpic",
},
error_file: "./logs/cpic-error.log",
out_file: "./logs/cpic-out.log",
log_file: "./logs/cpic-combined.log",
time: true,
},
// {//中国人寿保险爬虫
// name: "china-life-spider",
// script: "./service/china-life.js",
// instances: 1,
// autorestart: true,
// watch: false,
// max_memory_restart: "300M",
// env: {
// NODE_ENV: "production",
// SPIDER_NAME: "china-life",
// },
// error_file: "./logs/china-life-error.log",
// out_file: "./logs/china-life-out.log",
// log_file: "./logs/china-life-combined.log",
// time: true,
// },
{//中华保险爬虫
name: "cic-spider",
script: "./service/cic.js",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "300M",
env: {
NODE_ENV: "production",
SPIDER_NAME: "cic",
},
error_file: "./logs/cic-error.log",
out_file: "./logs/cic-out.log",
log_file: "./logs/cic-combined.log",
time: true,
},
{//众诚保险爬虫
name: "urtrust-spider",
script: "./service/urtrust.js",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "300M",
env: {
NODE_ENV: "production",
SPIDER_NAME: "urtrust",
},
error_file: "./logs/urtrust-error.log",
out_file: "./logs/urtrust-out.log",
log_file: "./logs/urtrust-combined.log",
time: true,
},
],
};