Skip to content

Commit

Permalink
chore(dependencies): update cassandra-driver to v4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
syncush committed Sep 15, 2019
1 parent bba30e3 commit 7445468
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
27 changes: 20 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"bluebird": "^3.5.5",
"body-parser": "^1.19.0",
"bunyan": "^1.8.12",
"cassandra-driver": "^3.5.0",
"cassandra-driver": "^4.1.0",
"cassandra-migration": "^2.7.0",
"copy-dir": "^0.3.0",
"cron": "^1.7.1",
Expand Down
4 changes: 2 additions & 2 deletions src/config/databaseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const config = {
cassandraReplicationFactor: process.env.CASSANDRA_REPLICATION_FACTOR || 1,
cassandraConsistency: getCassandraConsistencyByName(process.env.CASSANDRA_CONSISTENCY),
cassandraKeyspaceStrategy: process.env.CASSANDRA_KEY_SPACE_STRATEGY || 'SimpleStrategy',
cassandraLocalDataCenter: process.env.CASSANDRA_LOCAL_DATA_CENTER,
cassandraLocalDataCenter: process.env.CASSANDRA_LOCAL_DATA_CENTER || 'datacenter1',
sqliteStorage: process.env.SQLITE_STORAGE || 'predator'
};

Expand All @@ -20,4 +20,4 @@ function getCassandraConsistencyByName(cassandraConsistencyName) {
return consistency;
}

module.exports = config;
module.exports = config;
3 changes: 2 additions & 1 deletion src/database/cassandra-handler/cassandra.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ async function createClient() {
const config = {
contactPoints: String(databaseConfig.address).split(','),
keyspace: databaseConfig.name,
authProvider
authProvider,
localDataCenter: databaseConfig.cassandraLocalDataCenter
};

let cassandraClient = new cassandra.Client(config);
Expand Down
3 changes: 2 additions & 1 deletion src/database/cassandra-handler/cassandraMigration.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ function buildClient(keyspace) {
let authProvider = new cassandra.auth.PlainTextAuthProvider(args.cassandra_username, args.cassandra_password);
let cassandraClient = {
contactPoints: args.cassandra_url.split(','),
authProvider: authProvider
authProvider: authProvider,
localDataCenter: args.cassandra_local_data_center
};

if (keyspace) {
Expand Down

0 comments on commit 7445468

Please sign in to comment.