question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to exiting gracefully?

See original GitHub issue

Before exiting, I want to wait all queries finished, then connection destroyed gracefully. Like calling ‘end’ method in mysql package.

Is there any way to do this in sequelize? I found destroy $disconnect method in connectionManager, but I didn’t find the way to call them from a Sequelize instance.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

32reactions
tedehcommented, Jul 25, 2017

So the succint answer is sequelize.connectionManager.close().then(() => console.log('shut down gracefully')); for anyone else coming here.

28reactions
vajahathcommented, Nov 24, 2017

I guess as of now you can use sequelize.close().then..

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exiting Gracefully - Rich Mironov
Talk your CEO through your exit story and agree on it. Send/email your proposed language. Offer to continue saying nice things about the...
Read more >
How to Exit an Organization Gracefully and Why It Matters
1. Ask for what you need · 2. Maintain clear lines of communication · 3. Set reasonable boundaries · 4. Practice acceptance ·...
Read more >
How to Leave Your Job Gracefully - Harvard Business Review
Work hard until your last day. Don't sully your hard-won reputation by slacking off at the end. Go out on a high note...
Read more >
Graceful exit - Wikipedia
A graceful exit (or graceful handling) is a simple programming idiom wherein a program detects a serious error condition and "exits gracefully" in...
Read more >
How to end and exit a conversation gracefully - TES
Another way to exit a conversation is to express appreciation for something that the other person said or did. I appreciate you helping...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found