mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
override status for broken status
This commit is contained in:
parent
ccdb206dbb
commit
6a739d652b
1 changed files with 15 additions and 0 deletions
|
@ -1029,6 +1029,21 @@ if (typeof obj.percent == "undefined") {
|
|||
obj.bytesperminute = 0;
|
||||
}
|
||||
|
||||
// check if wrong status message
|
||||
if (obj.status == "transmit" && obj.percent == 0) {
|
||||
var TimeDifference = (new Date().getTime()/1000) - obj.timestamp
|
||||
if (TimeDifference > 3600){
|
||||
db.upsert(obj._id, function (doc) {
|
||||
if (!doc.status) {
|
||||
doc.status = "failed";
|
||||
}
|
||||
return doc;
|
||||
});
|
||||
obj.status = "failed";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof config.max_retry_attempts == "undefined") {
|
||||
var max_retry_attempts = 3;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue