Skip to content

Include callback param? #68

@0o-de-lally

Description

@0o-de-lally

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions