修改启动脚本
This commit is contained in:
parent
dec318f297
commit
0220c16758
@ -1,4 +1,5 @@
|
|||||||
const os = require('os');
|
|
||||||
|
let config = require('./config/config.json');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
apps: [
|
apps: [
|
||||||
{
|
{
|
||||||
@ -8,7 +9,7 @@ module.exports = {
|
|||||||
instances : 1, // scale this up if the proxy becomes the bottleneck
|
instances : 1, // scale this up if the proxy becomes the bottleneck
|
||||||
exec_mode : 'cluster',
|
exec_mode : 'cluster',
|
||||||
env: {
|
env: {
|
||||||
REDIS_URL: "redis://127.0.0.1:6379/15"
|
REDIS_URL: config.redis
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,22 @@ let arrUtil = {
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 移除数组index位置的元素
|
||||||
|
* @param arr
|
||||||
|
* @param index
|
||||||
|
*/
|
||||||
|
spliceOne(arr: any[], index: number): boolean {
|
||||||
|
if (index === -1 || index >= arr.length) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const len = arr.length - 1;
|
||||||
|
for (let i = index; i < len; i++) {
|
||||||
|
arr[i] = arr[i + 1];
|
||||||
|
}
|
||||||
|
arr.length = len;
|
||||||
|
return true;
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 检查数组中是否含有另外一个object
|
* 检查数组中是否含有另外一个object
|
||||||
* @param arr 目标数组
|
* @param arr 目标数组
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"src/index.ts",
|
"src/index.ts",
|
||||||
|
"src/robot.ts",
|
||||||
"src/global.d.ts"
|
"src/global.d.ts"
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user