duct

ts1503 2022-04-29T09:27:14.158159Z

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?

2022-04-29T10:11:01.691109Z

Just start your own system.

(def system
  (ig/init config))

(ig/halt! system)

ts1503 2022-04-29T10:12:32.021379Z

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

2022-04-29T10:48:21.642939Z

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

ts1503 2022-04-29T09:28:47.872919Z

I know I can call

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