Hello,
Is it possible to halt a production system that I launch this way: java -jar myapp.jar
and run the ig/halt-key!
handlers before stopping the app process?
Thanks
You can give Java a callback to call before the process ends, but a better solution is to ensure that you don’t need to clean up anything.
Thank you James. I aim to serialize the session atom to a file and load it back when deploying a new version. So is this approach "wrong"?
By session you mean a Ring session?
Yes, the most basic one. Something like this:
{"53a4af78-7220-4735-a83e-26260a95df28"
{:ring.middleware.anti-forgery/anti-forgery-tokenn "K3gfWWtYqmcMerH2we/7R+UOLATlG0MfLqDmO4V/UF2J3E6mFRo0rJYFNb0eiUGzvB+moKMvd+1AQi8X",
:identity {:username "admin", :roles #{:admin :user}}}}
I wouldn’t recommend using the memory session for production applications. It’s really only intended for development. Either use the cookie session store, or a database session store.
Understood. Thanks. And thank you again for all the great libs you publish.