Issue #19296 - Cleanup old unused code/files and consolidate #224

Merged
merged 5 commits into from Apr 4, 2013
@@ -36,6 +36,17 @@ white:true*/
callback(m.err, m.result);
});
+
+ this.worker.on('exit', function (code, signal) {
+ var pid = that.worker.pid,
+ exitCode = that.worker.exitCode,
+ signalCode = that.worker.signalCode;
+
+ X.err('pgWorker ' + pid + ' died (exitCode: ' + exitCode + ' signalCode: ' + signalCode + '). Cannot run any more queries.');
+
+ // TODO - Figure out how to restart the worker. This doesn't work.
+ //that.worker = require('child_process').fork(__dirname + '/pgworker.js');
+ });
}
// NOTE: Round robin benchmarks are slower then the above single pgworker code.
@@ -103,7 +114,7 @@ white:true*/
/**
* Connected.
*
- * NOIE: This is only used when not using a seperate pgWorker process.
+ * NOTE: This is only used when not using a seperate pgWorker process.
* It's useful if you need to run the node-inspector debugger which breaks on multiple processes.
* See: https://github.com/dannycoates/node-inspector/issues/130
* You can also just run, "kill -USR1 12345", to start the debugger on a running process
@@ -12,7 +12,7 @@ regexp:true, undef:true, strict:true, trailing:true, white:true */
@extends X.Object
*/
X.Database = X.Object.extend(/** @lends X.Database */{
- poolSize: X.options && X.options.datasource & X.options.datasource.pgPoolSize ? X.options.datasource.pgPoolSize : 15,
+ poolSize: X.options && X.options.datasource && (typeof X.options.datasource.pgPoolSize !== 'undefined') ? X.options.datasource.pgPoolSize : 1,
className: "X.Database",
cleanupCompletedEvent: "cleanupCompleted",