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

Promisify 'automigrate' #630

Merged
merged 1 commit into from Jun 16, 2015
Merged

Conversation

PradnyaBaviskar
Copy link
Contributor

Connect strongloop/loopback#418

This PL, provides promise support to automigrate method of juggler's datasource.

@bajtos - can you review?

if(cb.promise) {
process.nextTick(cb);
return cb.promise;
}
return cb && process.nextTick(cb);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please simplify this code, cb is always defined thanks to L778.

I'd personally write this block as follows:

if (!this.connector.automigrate) {
  process.nextTick(cb);
  return cb.promise;
}

@bajtos
Copy link
Member

bajtos commented Jun 16, 2015

@PradnyaBaviskar nice! I have reviewed the patch. The implementation is good in principle, I'd like you to simplify it a bit - see my comments above.

@bajtos
Copy link
Member

bajtos commented Jun 16, 2015

@slnode test please

@PradnyaBaviskar
Copy link
Contributor Author

Addressed the comments above.

@bajtos , Please review.

bajtos added a commit that referenced this pull request Jun 16, 2015
@bajtos bajtos merged commit ecb8968 into loopbackio:master Jun 16, 2015
@bajtos
Copy link
Member

bajtos commented Jun 16, 2015

Landed, thank you!

@coodoo coodoo mentioned this pull request Jun 16, 2015
32 tasks
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

Successfully merging this pull request may close these issues.

None yet

3 participants