Run schema callback on nextTick
This commit is contained in:
parent
2e1cb45f01
commit
11171a7c7d
|
@ -1,6 +1,6 @@
|
|||
exports.initialize = function initializeSchema(schema, callback) {
|
||||
schema.adapter = new Memory();
|
||||
callback();
|
||||
process.nextTick(callback);
|
||||
};
|
||||
|
||||
function Memory() {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -15,7 +15,7 @@ exports.initialize = function initializeSchema(schema, callback) {
|
|||
});
|
||||
|
||||
schema.adapter = new MySQL(schema.client);
|
||||
callback();
|
||||
process.nextTick(callback);
|
||||
};
|
||||
|
||||
function MySQL(client) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue