atuttle / Taffy

:candy: The REST Web Service framework for ColdFusion and Lucee
http://taffy.io
Other
226 stars 117 forks source link

Swapped onApplicationStart() for applicationStop() where possible and… #403

Open cerdish opened 3 years ago

cerdish commented 3 years ago

… 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.

atuttle commented 2 years ago

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?