Move to devDependencies,set timeout
This commit is contained in:
3
package-lock.json
generated
3
package-lock.json
generated
@@ -443,7 +443,8 @@
|
|||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "3.9.5",
|
"version": "3.9.5",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz",
|
||||||
"integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ=="
|
"integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"which-module": {
|
"which-module": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
@@ -27,11 +27,11 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/got": "^9.6.11",
|
"@types/got": "^9.6.11",
|
||||||
"@types/node": "^14.0.13",
|
"@types/node": "^14.0.13",
|
||||||
"@types/yargs": "^15.0.5"
|
"@types/yargs": "^15.0.5",
|
||||||
|
"typescript": "^3.9.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"got": "^11.3.0",
|
"got": "^11.3.0",
|
||||||
"typescript": "^3.9.5",
|
|
||||||
"yargs": "^15.3.1"
|
"yargs": "^15.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@ async function loop(args:envVars) {
|
|||||||
console.info(`Name: ${selfName}`);
|
console.info(`Name: ${selfName}`);
|
||||||
|
|
||||||
let lastUpdate = 0;
|
let lastUpdate = 0;
|
||||||
const timeout = 50;
|
const timeout = 100;
|
||||||
try {
|
try {
|
||||||
while (true) {
|
while (true) {
|
||||||
//basically, check every second at max
|
//basically, check every second at max
|
||||||
@@ -43,7 +43,7 @@ async function loop(args:envVars) {
|
|||||||
}
|
}
|
||||||
}catch(e){
|
}catch(e){
|
||||||
console.error("E:",e.msg||e.message||'Error');
|
console.error("E:",e.msg||e.message||'Error');
|
||||||
setTimeout(loop,5000);
|
setTimeout(loop,timeout*101);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user