integrant

lambdam 2020-04-05T15:43:03.003700Z

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

2020-04-05T15:44:36.003800Z

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.

lambdam 2020-04-05T15:47:41.004Z

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"?

2020-04-05T15:48:25.004200Z

By session you mean a Ring session?

lambdam 2020-04-05T15:53:40.004400Z

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}}}}

2020-04-05T15:54:34.004600Z

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.

lambdam 2020-04-05T15:55:44.004800Z

Understood. Thanks. And thank you again for all the great libs you publish.