-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(custom-js): implement GET /processors (#212)
* chore(dependencies): update cassandra-driver to v4.1.0 (#210) * feat(custom-js): implement GET /processors (Sequelize only) * test(processors): add tests for GET /processors (#186) * feat(custom-js): implement GET /processors (cassandra) * test(processors): add unit-tests for insertProcessor
- Loading branch information
Showing
12 changed files
with
246 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ module.exports = { | |
PROMETHEUS_METRICS: 'prometheus_metrics', | ||
SMTP_SERVER: 'smtp_server' | ||
} | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
'use strict'; | ||
|
||
let databaseConfig = require('../../../config/databaseConfig'); | ||
let cassandraConnector = require('./cassandra/cassandraConnector'); | ||
let sequelizeConnector = require('./sequelize/sequelizeConnector'); | ||
let databaseConnector = databaseConfig.type.toLowerCase() === 'cassandra' ? cassandraConnector : sequelizeConnector; | ||
|
||
module.exports = { | ||
init, | ||
closeConnection, | ||
insertProcessor | ||
getAllProcessors, | ||
insertProcessor, | ||
closeConnection | ||
}; | ||
|
||
async function insertProcessor(jobId, jobInfo) { | ||
return databaseConnector.insertProcessor(jobId, jobInfo); | ||
} | ||
|
||
async function init() { | ||
return databaseConnector.init(); | ||
} | ||
|
||
function closeConnection() { | ||
return databaseConnector.closeConnection(); | ||
} | ||
} | ||
|
||
async function getAllProcessors(from, limit) { | ||
return databaseConnector.getAllProcessors(from, limit); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.