优化启动脚本
This commit is contained in:
parent
acfee0ee69
commit
65abad1eb3
@ -168,7 +168,11 @@ export class EventBatchSvr {
|
||||
const record = await GeneralEvent.saveEvent(event)
|
||||
blockNumber = Math.max(parseInt(event.blockNumber, 16), cfg.fromBlock)
|
||||
if (cfg.eventProcesser && eventProcessers[cfg.eventProcesser]) {
|
||||
await eventProcessers[cfg.eventProcesser].parseEvent(record)
|
||||
try {
|
||||
await eventProcessers[cfg.eventProcesser].parseEvent(record)
|
||||
} catch (err) {
|
||||
logger.error('process event error: ', err.message || err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return blockNumber
|
||||
|
@ -2,8 +2,7 @@
|
||||
"apps": [
|
||||
{
|
||||
"name": "chain-client",
|
||||
"script": "npm",
|
||||
"args": "run prod:api",
|
||||
"script": "./dist/api.js",
|
||||
"cwd": "/root/code/web_chain_client",
|
||||
"max_memory_restart": "1024M",
|
||||
"log_date_format": "YYYY-MM-DD HH:mm Z",
|
||||
@ -12,7 +11,44 @@
|
||||
"instances": 1,
|
||||
"exec_mode": "fork",
|
||||
"env": {
|
||||
"NODE_ENV": "production",
|
||||
"NODE_PATH": "./dist"
|
||||
},
|
||||
"env_production": {
|
||||
"NODE_ENV": "production"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "chain-scriptions",
|
||||
"script": "./dist/scriptions.js",
|
||||
"cwd": "/root/code/web_chain_client",
|
||||
"max_memory_restart": "1024M",
|
||||
"log_date_format": "YYYY-MM-DD HH:mm Z",
|
||||
"watch": false,
|
||||
"ignore_watch": ["node_modules", "logs", "fixtures", "tasks"],
|
||||
"instances": 1,
|
||||
"exec_mode": "fork",
|
||||
"env": {
|
||||
"NODE_ENV": "production",
|
||||
"NODE_PATH": "./dist"
|
||||
},
|
||||
"env_production": {
|
||||
"NODE_ENV": "production"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "chain-events",
|
||||
"script": "./dist/events.js",
|
||||
"cwd": "/root/code/web_chain_client",
|
||||
"max_memory_restart": "1024M",
|
||||
"log_date_format": "YYYY-MM-DD HH:mm Z",
|
||||
"watch": false,
|
||||
"ignore_watch": ["node_modules", "logs", "fixtures", "tasks"],
|
||||
"instances": 1,
|
||||
"exec_mode": "fork",
|
||||
"env": {
|
||||
"NODE_ENV": "production",
|
||||
"NODE_PATH": "./dist"
|
||||
},
|
||||
"env_production": {
|
||||
"NODE_ENV": "production"
|
||||
|
Loading…
x
Reference in New Issue
Block a user