serverless-plugin-simulate
serverless-plugin-simulate copied to clipboard
Hold a promise until signal caught, ensuring service remains running
What did you implement:
Closes #104
How did you implement it:
Adds a new promise to the promise chains that handle long-running services. That promise fulfills when an exit signal (SIGTERM SIGINT) is received. This code is strongly inspired by similar code in serverless-offline.
How can we verify it:
Not sure. I couldn't figure out why the problem behavior (#104) started happening; given the fix, I'm surprised it doesn't happen more, and I expect there's something I'm missing. I'd love to talk to someone with more expertise, maybe we can figure that out.
Todos:
- [ ] Write tests
- [ ] Write documentation
- [ ] Fix linting errors
- [ ] Provide verification config/commands/resources
- [X] Change ready for review message below
Is this ready for review?: Sure?