Include callback param?
0o-de-lally opened this issue · 0 comments
0o-de-lally commented
I don't see anywhere in the docs a mention of callbacks. I see Migrations is synchronous, but a migration may have async operations. In that case one needs to use futures or such to have a return wait.
I would expect there to be an API like:
Migrations.migrateTo(1, function(err, res){
console.log('hello')
//run maintenance method
//trigger external api call
// etc. etc.
});
Am I not seeing something in the docs or is this intentionally not implemented?
It would also be worth mentioning an example of async updates in the docs. For example, bulk updates will finish after the migration returns completed, unless using Futures or other.