|
@@ -16,7 +16,8 @@ let info = {
|
|
|
tokens: null,
|
|
|
expire: 0,
|
|
|
active: true,
|
|
|
- updateTime: 4000 // 25000 Api call / 24H
|
|
|
+ updateTime: 4000, // 25000 Api call / 24H,
|
|
|
+ error: 0
|
|
|
}
|
|
|
|
|
|
if (process.env.access_token) {
|
|
@@ -39,8 +40,8 @@ async function watchLinkedin(){
|
|
|
info.error = 0
|
|
|
}
|
|
|
}).catch( (err) => {
|
|
|
- console.log("[DEBUG-LOG][watchLinkedin ERROR]", err);
|
|
|
- info.error++
|
|
|
+ console.log("[DEBUG-LOG][watchLinkedin ERROR]", info.error, err);
|
|
|
+ info.error = info.error + 10
|
|
|
if (info.error > 50) {
|
|
|
info.active = false
|
|
|
mail.notif(process.env.usermail, process.env.pswd, process.env.contact);
|