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

Fix bin process not always exiting #5349

Merged
merged 1 commit into from
Oct 14, 2018

Conversation

jogold
Copy link
Contributor

@jogold jogold commented Oct 2, 2018

What did you implement:

Closes #5348

How did you implement it:

Add .then(() => process.exit(0)) after serverless.run() in bin file.

Todos:

  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@horike37 horike37 added this to the 1.33.0 milestone Oct 14, 2018
Copy link
Contributor

@horike37 horike37 left a comment

Choose a reason for hiding this comment

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

@jogold
Good point. Agreed with the approach.
LGTM 👍

@horike37 horike37 merged commit 4d05308 into serverless:master Oct 14, 2018
dschep added a commit that referenced this pull request Nov 19, 2018
Convert logging to return a promise so that #5349 no longer causes #5497
@brunotag
Copy link

FYI this is now breaking the serverless-alexa-skills plugin, see marcy-terui/serverless-alexa-skills#24

@bradbenvenuti
Copy link

bradbenvenuti commented Nov 27, 2018

This also seems to be breaking sls invoke local for nodejs when using callbacks.

For example - when running this handler function with sls invoke local, the cli exits before the callback is run:

module.exports.hello = (event, context, callback) => {
    setTimeout(function(err, obj) {
        callback({
            statusCode: 200,
            body: JSON.stringify({
                message: 'Go Serverless v1.0! Your function executed successfully!',
                input: event
            })
        })
    }, 1000);
};

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.

4 participants