Fork me on GitHub
#duct
<
2022-04-29
>
ts150309:04:14

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?

hden10:04:01

Just start your own system.

(def system
  (ig/init config))

(ig/halt! system)

ts150310:04:32

thanks. just thought there could be something built in for such cases

hden10:04:21

Personally I haven’t used it, but this might be what you’re looking for. https://github.com/duct-framework/duct/pull/23

ts150309:04:47

I know I can call

(System/exit 0)
but it feels not right for some reason