Skip to content

Commit 7fcab1d

Browse files
authored
Merge pull request #27 from ship-components/bugfix/tuple-concurrently-updated
fix "tuple concurrently updated" error
2 parents 600b787 + 846108c commit 7fcab1d

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ ceres create example
2828

2929
## History
3030

31+
* 0.13.13 - fixed "tuple concurrently updated" issue with liveDb
3132
* 0.13.12 - Updated express and moment, fixed issue with headers already sent log spam
3233
* 0.13.11 - Switched to jest unit test framework, added junit test results, added clover.xml coverage. Limited React to v15 for now.
3334
* 0.13.10 - Added stack trace for unrecognized errors

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ceres-framework",
3-
"version": "0.13.12",
3+
"version": "0.13.13",
44
"description": "Node.js Framework for React Applications",
55
"main": "src/index.js",
66
"bin": {

src/db/bookshelf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ module.exports = function(config, Ceres) {
5858

5959
Ceres.log._ceres.silly('Setting up livePG connection');
6060

61-
// Setup live db connection
62-
db.liveDb = new LivePG(connection, config.db.database);
61+
// Setup live db connection using a unique channel for each instance
62+
db.liveDb = new LivePG(connection, config.db.database + '_' + process.env.CERES_UNIQUE_ID);
6363

6464
// Clean up on exit
6565
process.on('exit', function() {

src/setup/run-cluster.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = function(ceres) {
4848
if (cluster.isMaster) {
4949
// Fork children
5050
for (var i = 0; i < ceres.config.instances; i++) {
51-
forkWorker(ceres);
51+
forkWorker(ceres, { CERES_UNIQUE_ID: i });
5252
}
5353

5454
// Attempt to restart children that crash
@@ -60,7 +60,7 @@ module.exports = function(ceres) {
6060
exitCode: code,
6161
argv: process.argv
6262
});
63-
forkWorker(ceres);
63+
forkWorker(ceres, { CERES_UNIQUE_ID: worker.process.env.CERES_UNIQUE_ID });
6464
}
6565
});
6666

0 commit comments

Comments
 (0)