Swapped onApplicationStart() for applicationStop() where possible and…#403
Open
cerdish wants to merge 1 commit intoatuttle:mainfrom
Open
Swapped onApplicationStart() for applicationStop() where possible and…#403cerdish wants to merge 1 commit intoatuttle:mainfrom
cerdish wants to merge 1 commit intoatuttle:mainfrom
Conversation
… added onRequestEnd() to run the applicationStop() function.
Owner
|
Sorry for the year+ wait. If you're still interested in getting this change landed, I'd love to talk to you about it. I don't fully understand the motivation for this PR. What exactly was broken that this fixes? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… added onRequestEnd() to run the applicationStop() function. also removed what seemed like some duplicate logic for when to display the dashboard, but i'm not sure if it was really duplicate. everything seems to work fine without it though. I also made it so that if the version changes that causes the application to reset.
the reason for the change is that calling onApplicationStart() doesn't actually reset the application. it just resets the variables. while you would think this would be sufficient, in my experience you often have to change the application name itself in order to get the freshest version of your api to be reflected in the dashboard and requests.
this does mean you don't get the freshest version of the api on that first request for the new version, but you are 100% going to get it on the next request.