@tiledesk/tiledesk-server 2.4.22 → 2.4.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -18,23 +18,36 @@
|
|
18
18
|
var RoleConstants = require("../../models/roleConstants");
|
19
19
|
|
20
20
|
|
21
|
-
function del(client, key, callback) {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
21
|
+
async function del(client, key, callback) {
|
22
|
+
key = "cacheman:cachegoose-cache:" + key;
|
23
|
+
winston.debug("key: "+key)
|
24
|
+
|
25
|
+
// client.del(key, function (err, data) {
|
26
|
+
// if (err) {
|
27
|
+
// return callback(error);
|
28
|
+
// } else {
|
29
|
+
// winston.info("del data: "+ data)
|
30
|
+
|
31
|
+
// return callback(null, data);
|
32
|
+
// }
|
33
|
+
// });
|
30
34
|
|
31
35
|
// client.del(key).then(function(result) {
|
32
|
-
// winston.
|
36
|
+
// winston.info("result", result)
|
33
37
|
// return callback(null, result);
|
34
38
|
// }).catch(function(error) {
|
35
|
-
// winston.
|
39
|
+
// winston.error("here3", error)
|
36
40
|
// return callback(error);
|
37
41
|
// });
|
42
|
+
|
43
|
+
var res = await client.del(key)
|
44
|
+
winston.debug("result: "+ res)
|
45
|
+
if (res) {
|
46
|
+
return callback(null, res);
|
47
|
+
} else {
|
48
|
+
var error = "error";
|
49
|
+
return callback(error);
|
50
|
+
}
|
38
51
|
}
|
39
52
|
|
40
53
|
function listen(client) {
|
@@ -311,8 +324,11 @@
|
|
311
324
|
function invalidatRequestSimple(client, project_id, rid, request_id) {
|
312
325
|
var key = project_id+":requests:id:"+rid+":simple";
|
313
326
|
winston.verbose("Deleting cache for widgets with key: " + key);
|
327
|
+
|
314
328
|
// found del
|
329
|
+
winston.debug("Deleted4545");
|
315
330
|
del(client._cache._engine.client, key, function (err, reply) { //tested
|
331
|
+
|
316
332
|
// client.del(key, function (err, reply) {
|
317
333
|
winston.debug("Deleted cache for invalidatRequestSimple",reply);
|
318
334
|
winston.verbose("Deleted cache for invalidatRequestSimple",{err:err});
|
@@ -400,6 +400,8 @@ class RequestService {
|
|
400
400
|
return reject(err);
|
401
401
|
}
|
402
402
|
|
403
|
+
winston.debug('request cache simple 3', request);
|
404
|
+
|
403
405
|
winston.debug("here reroute1 ");
|
404
406
|
|
405
407
|
// Cannot read property 'toString' of undefined at /usr/src/app/services/requestService.js:404:61 at /usr/src/app/node_modules/cachegoose/out/extend-query.js:44:13 at Command.cb [as callback] (/usr/src/app/node_modules/cacheman-redis/node/index.js:142:9) at normal_reply (/usr/src/app/node_modules/redis/index.js:655:21) at RedisClient.return_reply (/usr/src/app/node_modules/redis/index.js:753:9) at JavascriptRedisParser.returnReply (/usr/src/app/node_modules/redis/index.js:138:18) at JavascriptRedisParser.execute (/usr/src/app/node_modules/redis-parser/lib/parser.js:544:14) at Socket.<anonymous> (/usr/src/app/node_modules/redis/index.js:219:27) at Socket.emit (events.js:314:20) at addChunk (_stream_readable.js:297:12) at readableAddChunk (_stream_readable.js:272:9) at Socket.Readable.push (_stream_readable.js:213:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {"date":"Tue Mar 21 2023 18:45:47 GMT+0000 (Coordinated Unive
|
@@ -1020,7 +1022,18 @@ class RequestService {
|
|
1020
1022
|
// winston.debug(" request", request);
|
1021
1023
|
winston.debug("Request waitingTime setted");
|
1022
1024
|
//cacheinvalidation
|
1023
|
-
return resolve(request.save());
|
1025
|
+
// return resolve(request.save());
|
1026
|
+
request.save(function(err, savedRequest) {
|
1027
|
+
if (err) {
|
1028
|
+
return reject(err);
|
1029
|
+
}
|
1030
|
+
requestEvent.emit('request.update', savedRequest);
|
1031
|
+
|
1032
|
+
return resolve(savedRequest);
|
1033
|
+
});
|
1034
|
+
|
1035
|
+
|
1036
|
+
|
1024
1037
|
}else {
|
1025
1038
|
return resolve(request);
|
1026
1039
|
}
|