Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include callback param? #68

Open
0o-de-lally opened this issue Nov 29, 2016 · 0 comments
Open

Include callback param? #68

0o-de-lally opened this issue Nov 29, 2016 · 0 comments

Comments

@0o-de-lally
Copy link

0o-de-lally commented Nov 29, 2016

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.

@0o-de-lally 0o-de-lally changed the title Can migrations pass a callback? Include callback param? Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant