Run schema callback on nextTick

This commit is contained in:
Anatoliy Chakkaev 2011-11-13 15:05:50 +07:00
parent 2e1cb45f01
commit 11171a7c7d
5 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
exports.initialize = function initializeSchema(schema, callback) {
schema.adapter = new Memory();
callback();
process.nextTick(callback);
};
function Memory() {

View File

@ -27,7 +27,7 @@ exports.initialize = function initializeSchema(schema, callback) {
}
schema.client = mongoose.connect(schema.settings.url);
schema.adapter = new MongooseAdapter(schema.client);
callback();
process.nextTick(callback);
};
function MongooseAdapter(client) {

View File

@ -15,7 +15,7 @@ exports.initialize = function initializeSchema(schema, callback) {
});
schema.adapter = new MySQL(schema.client);
callback();
process.nextTick(callback);
};
function MySQL(client) {

View File

@ -6,7 +6,7 @@ var neo4j = require('./neo4j-lib');
exports.initialize = function initializeSchema(schema, callback) {
schema.client = new neo4j.GraphDatabase(schema.settings.url);
schema.adapter = new Neo4j(schema.client);
callback();
process.nextTick(callback);
};
function Neo4j(client) {

View File

@ -2,7 +2,7 @@ var Sequelize = require('sequelize');
exports.initialize = function initializeSchema(schema, callback) {
schema.adapter = new SequelizeAdapter(schema);
callback();
process.nextTick(callback);
};
function SequelizeAdapter(schema) {