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.

Process does not exit after successful migration [$30 awarded]

See original GitHub issue

I am using v.0.10.0-beta.20 and the mongodb driver.

I have tied both the Promise and callback strategies, but the process just hangs.

exports.up = function () {
    return new Promise((resolve, reject) => {
        resolve("success");
    });
};
// or this...
exports.up = function (db, callback) {
    callback(null, "success");
};

image

The migration is actually running successfully but it doesn’t ever “finish”. The process does exit if there are no migrations to run, if the Promise is rejected, or if an error is passed to the callback. This is affecting us because it’s not allowing us to chain commands (db-migrate up && npm run verify-db), also preventing Travis from completing. I don’t mind submitting a PR if you can point me in the right direction. I don’t know where to look right now.

<bountysource-plugin>

The $30 bounty on this issue has been claimed at Bountysource. </bountysource-plugin>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:21 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
DesignByOnyxcommented, Jan 11, 2017

ah, ok - It must be because I am including our app which sets up sockets and such. The method I’m calling is directly on a mongoose Model - the sockets are just a side effect of loading our app. Thanks so much man, this is a problem we can solve on our end.

For anybody else experiencing the hanging issue, maybe due to something similar to our app, passing --force-exit will run your migrations and exit the process when they are complete.

0reactions
wzrdtalescommented, Jan 11, 2017

@DesignByOnyx Closing here as solved, feel free to reach out any time again and good look you and your team with your project!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrade Problems Debian 14.2.4 - Migrations - GitLab Forum
Hey, I have a problem after migration. I called apt-get upgrade and gitlab-ee startet to upgrade to 14.2.4 (from 14.0.1).
Read more >
Troubleshooting Failed Migrations - Microsoft Community Hub
A 'failed migration' is when the status of the move request shows as 'failed', and we have one or more failures logged in...
Read more >
my nodejs script is not exiting on its own after successful ...
I just went through this issue. The problem with just using process.exit() is that the program I am working on was creating handles, ......
Read more >
Debugging Your AWS DMS Migrations: What to Do When ...
CloudWatch logging is not enabled by default when you create a migration task in AWS DMS. You need to explicitly enable it to...
Read more >
Data Migration Testing Tutorial: A Complete Guide
Need to ensure if the user can continue to use all the features of the software by causing minimal or no damage during...
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