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
- console.log("[LOCK: " + key + "] " + text);
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
- req.log("Error on preview node: " + err.message + ", err: " + JSON.stringify(err));
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
@@ -147,11 +147,6 @@ exports = module.exports = function()
147
147
  }
148
148
  };
149
149
 
150
- // var _LOCK = function(lockKey, workFunction)
151
- // {
152
- // process.locks.lock(lockKey, workFunction);
153
- // };
154
-
155
150
  var r = {};
156
151
 
157
152
  /**
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "name": "cloudcms-server",
8
8
  "description": "Cloud CMS Application Server Module",
9
- "version": "3.2.307",
9
+ "version": "3.2.309",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git://github.com/gitana/cloudcms-server.git"
package/util/cloudcms.js CHANGED
@@ -710,7 +710,7 @@ exports = module.exports = function()
710
710
 
711
711
  if (err) {
712
712
 
713
- if (err.code === 404) {
713
+ if (err.status === 404) {
714
714
  return callback();
715
715
  }
716
716
 
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
- // var http = require("http");
4
- // var https = require("https");
5
- //
6
- // var FormData = require("form-data");
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 axios.request(requestConfig).then(function(response) {
132
+ return client.request(requestConfig).then(function(response) {
131
133
  callback(null, response, response.data);
132
134
  }, function(error) {
133
135
  callback(error);