GWicke has submitted this change and it was merged.

Change subject: Update restbase-cassandra to v0.3.5
......................................................................


Update restbase-cassandra to v0.3.5

Change-Id: I99fa69bb57f0df441c286c3f94c0dfcb239ccd7d
---
M node_modules/restbase-cassandra/lib/index.js
M 
node_modules/restbase-cassandra/node_modules/restify/node_modules/lru-cache/package.json
M node_modules/restbase-cassandra/package.json
3 files changed, 9 insertions(+), 30 deletions(-)

Approvals:
  GWicke: Verified; Looks good to me, approved



diff --git a/node_modules/restbase-cassandra/lib/index.js 
b/node_modules/restbase-cassandra/lib/index.js
index add4272..67e0e9b 100644
--- a/node_modules/restbase-cassandra/lib/index.js
+++ b/node_modules/restbase-cassandra/lib/index.js
@@ -3,16 +3,7 @@
 var cass = require('cassandra-driver');
 var DB = require('./db');
 
-function promisifyClient (client, options) {
-    var methods = ['connect', 'shutdown', 'execute', 'batch'];
-    methods.forEach(function(method) {
-        //console.log(method, client[method]);
-        client[method + '_p'] = Promise.promisify(client[method].bind(client));
-    });
-
-    return client;
-}
-
+Promise.promisifyAll(cass, { suffix: '_p' });
 
 function makeClient (options) {
     var clientOpts = {};
@@ -24,23 +15,11 @@
                 conf.username, conf.password);
     }
 
-    var client = promisifyClient(new cass.Client(clientOpts));
+    var client = new cass.Client(clientOpts);
 
-    var reconnectCB = function(err) {
-        if (err) {
-            // keep trying each 500ms
-            options.log('error/cassandra/connection', err,
-                    'Cassandra connection error, retrying..');
-            setTimeout(client.connect.bind(client, reconnectCB), 500);
-        }
-    };
-    client.on('connection', reconnectCB);
     client.on('log', options.log);
 
-    return client.connect_p()
-    .then(function() {
-        return new DB(client, options);
-    });
+    return Promise.resolve(new DB(client, options));
 }
 
 module.exports = makeClient;
diff --git 
a/node_modules/restbase-cassandra/node_modules/restify/node_modules/lru-cache/package.json
 
b/node_modules/restbase-cassandra/node_modules/restify/node_modules/lru-cache/package.json
index 2474729..be2cfc9 100644
--- 
a/node_modules/restbase-cassandra/node_modules/restify/node_modules/lru-cache/package.json
+++ 
b/node_modules/restbase-cassandra/node_modules/restify/node_modules/lru-cache/package.json
@@ -31,7 +31,7 @@
     "shasum": "d82388ae9c960becbea0c73bb9eb79b6c6ce9aeb",
     "tarball": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz";
   },
-  "_from": "lru-cache@2",
+  "_from": "lru-cache@^2.5.0",
   "_npmVersion": "1.3.15",
   "_npmUser": {
     "name": "isaacs",
diff --git a/node_modules/restbase-cassandra/package.json 
b/node_modules/restbase-cassandra/package.json
index c710aad..9db4e46 100644
--- a/node_modules/restbase-cassandra/package.json
+++ b/node_modules/restbase-cassandra/package.json
@@ -1,7 +1,7 @@
 {
   "name": "restbase-cassandra",
   "description": "RESTBase table storage on Cassandra",
-  "version": "0.3.4",
+  "version": "0.3.5",
   "dependencies": {
     "async": "0.x.x",
     "bluebird": "~2.3.10",
@@ -23,8 +23,8 @@
   },
   "readme": "# [RESTBase](https://github.com/gwicke/restbase) table storage on 
Cassandra\n\nProvides a high-level table storage service abstraction similar to 
Amazon\nDynamoDB or Google DataStore, with a Cassandra backend. See [the 
design\ndocs](https://github.com/gwicke/restbase-cassandra/tree/master/doc) 
for\ndetails and background.\n\nThis is the default table storage backend 
for\n[RESTBase](https://github.com/gwicke/restbase), and automatically 
installed as\nan npm module dependency (`restbase-cassandra`). See the install 
instructions\nthere.\n  \n## Status\nPrototype, not quite ready for 
production.\n\n[![Build 
Status](https://travis-ci.org/gwicke/restbase-cassandra.svg?branch=master)](https://travis-ci.org/gwicke/restbase-cassandra)\n\nFeatures:\n-
 basic table storage service with REST interface, backed by Cassandra\n- 
multi-tenant design: domain creation, prepared for per-domain ACLs\n- table 
creation with declarative JSON schemas\n- secondary index creation and basic 
maintenance\n- data insertion and retrieval by primary key, including range 
queries\n\n### Next steps\n- More refined [secondary\n  
index](https://github.com/gwicke/restbase-cassandra/blob/master/doc/SecondaryIndexes.md)\n
  implementation\n    - range queries on secondary indexes\n- Refine HTTP 
interface & response formats, especially paging\n- Authentication (OAuth2 / JWT 
/ JWS / auth service callbacks) and ACLs\n- 
[Transactions](https://github.com/gwicke/restbase-cassandra/blob/master/doc/Transactions.md):\n
  light-weight CAS and 2PC\n- Get ready for production: robustness, 
performance, logging\n- Basic schema evolution support\n\n## Contributors\n* 
Gabriel Wicke <[email protected]>\n* Hardik Juneja 
<[email protected]>\n",
   "readmeFilename": "Readme.md",
-  "gitHead": "9a69cf18a5508b6ca42e9fe5468d904050dda8ec",
-  "_id": "[email protected]",
-  "_shasum": "ff89959b723347314566e2695f88f353b190bda1",
-  "_from": "[email protected]"
+  "gitHead": "8685ca8987f7a445d3dd846f39c4b17938adcff2",
+  "_id": "[email protected]",
+  "_shasum": "b2c076acd40b7c81648734043e8cb512551b2acf",
+  "_from": "[email protected]"
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/179769
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I99fa69bb57f0df441c286c3f94c0dfcb239ccd7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to