@tiledesk/tiledesk-server 2.4.30 → 2.4.31
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -69,7 +69,7 @@ findUnresponsiveRequests() {
|
|
69
69
|
// db.getCollection('requests').find({"hasBot":true, "status": { "$lt": 1000 }, "createdAt": { "$lte" :new ISODate("2020-11-28T20:15:31Z")} }).count()
|
70
70
|
|
71
71
|
|
72
|
-
//
|
72
|
+
// TODO escludi i ticket offline
|
73
73
|
var query = {hasBot:true, status: { $lt: 1000 }, createdAt: { $lte :new Date(Date.now() - this.queryAfterTimeout ).toISOString()} };
|
74
74
|
|
75
75
|
if (this.queryProject) {
|
@@ -77,7 +77,7 @@ findUnresponsiveRequests() {
|
|
77
77
|
}
|
78
78
|
|
79
79
|
|
80
|
-
//
|
80
|
+
// TODO dovrei fare una query escludendo tutti gli id_project su cui è disabilitato oppure dovrei salvare un attribute in ogni singola request
|
81
81
|
|
82
82
|
winston.debug("CloseBotUnresponsiveRequestTask query",query);
|
83
83
|
|
@@ -101,11 +101,12 @@ findUnresponsiveRequests() {
|
|
101
101
|
winston.debug("CloseBotUnresponsiveRequestTask: found unresponsive requests ", requests);
|
102
102
|
|
103
103
|
let i = 0;
|
104
|
-
let delay =
|
104
|
+
let delay = 0;
|
105
105
|
// winston.info("delay" + delay);
|
106
106
|
|
107
107
|
requests.forEach(request => {
|
108
108
|
i++;
|
109
|
+
delay = that.delayBeforeClosing*i;
|
109
110
|
setTimeout(function(){
|
110
111
|
|
111
112
|
// TODO aggiungi uno sleep
|