Hello guys! What is the best practice to stop the Duct system?
It’s simple to do in the repl by calling integrant.repl/halt function
but in my case I want to stop the system in the running application after some timeout
I can use integrant.core/halt! function but it requires the system parameter
Is there a way to get the system inside one of the components?
Just start your own system.
(def system
(ig/init config))
(ig/halt! system)thanks. just thought there could be something built in for such cases
Personally I haven’t used it, but this might be what you’re looking for. https://github.com/duct-framework/duct/pull/23
I know I can call
(System/exit 0)
but it feels not right for some reason