cloudcms-server 3.2.307 → 3.2.309
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/locks/locks.js
CHANGED
|
@@ -80,7 +80,7 @@ exports = module.exports = function()
|
|
|
80
80
|
// var skip = false;
|
|
81
81
|
// if (key === "channels") { skip = true; }
|
|
82
82
|
// if (!skip) {
|
|
83
|
-
|
|
83
|
+
// console.log("[LOCK: " + key + "] " + text);
|
|
84
84
|
// }
|
|
85
85
|
};
|
|
86
86
|
|
|
@@ -88,7 +88,7 @@ exports = module.exports = function()
|
|
|
88
88
|
provider.lock(key, function(err, _releaseFn) {
|
|
89
89
|
|
|
90
90
|
if (err) {
|
|
91
|
-
console.log("[LOCK: " + key + "] err: ", err);
|
|
91
|
+
//console.log("[LOCK: " + key + "] err: ", err);
|
|
92
92
|
try { _releaseFn(); } catch (e) { }
|
|
93
93
|
return fn(err);
|
|
94
94
|
}
|
|
@@ -414,11 +414,6 @@ exports = module.exports = function()
|
|
|
414
414
|
});
|
|
415
415
|
};
|
|
416
416
|
|
|
417
|
-
var _LOCK = function(cacheKey, workFunction)
|
|
418
|
-
{
|
|
419
|
-
process.locks.lock("branchload-" + cacheKey, workFunction);
|
|
420
|
-
};
|
|
421
|
-
|
|
422
417
|
// store a cache of branches since we don't want to reload these every time
|
|
423
418
|
var CACHED_BRANCHES = {};
|
|
424
419
|
|
|
@@ -1426,9 +1421,9 @@ exports = module.exports = function()
|
|
|
1426
1421
|
|
|
1427
1422
|
cloudcmsUtil.preview(contentStore, gitana, repositoryId, branchId, nodeId, nodePath, attachmentId, locale, previewId, size, mimetype, forceReload, function(err, filePath, cacheInfo, releaseLock) {
|
|
1428
1423
|
|
|
1429
|
-
if (err) {
|
|
1430
|
-
|
|
1431
|
-
}
|
|
1424
|
+
// if (err) {
|
|
1425
|
+
// req.log("Error on preview node: " + err.message + ", err: " + JSON.stringify(err));
|
|
1426
|
+
// }
|
|
1432
1427
|
|
|
1433
1428
|
// if the file was found on disk or was downloaded, then stream it back
|
|
1434
1429
|
if (!err && filePath && cacheInfo)
|
|
@@ -1481,7 +1476,6 @@ exports = module.exports = function()
|
|
|
1481
1476
|
|
|
1482
1477
|
releaseLock();
|
|
1483
1478
|
}
|
|
1484
|
-
|
|
1485
1479
|
});
|
|
1486
1480
|
}
|
|
1487
1481
|
else
|
package/package.json
CHANGED
package/util/cloudcms.js
CHANGED
package/util/request.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
var axios = require("axios");
|
|
2
|
+
var http = require("http");
|
|
3
|
+
var https = require("https");
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
var client = axios.create({
|
|
6
|
+
"httpAgent": http.globalAgent,
|
|
7
|
+
"httpsAgent": https.globalAgent
|
|
8
|
+
});
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* Incoming config:
|
|
@@ -127,7 +129,7 @@ module.exports = function(config, callback)
|
|
|
127
129
|
}
|
|
128
130
|
*/
|
|
129
131
|
|
|
130
|
-
return
|
|
132
|
+
return client.request(requestConfig).then(function(response) {
|
|
131
133
|
callback(null, response, response.data);
|
|
132
134
|
}, function(error) {
|
|
133
135
|
callback(error);
|