This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-24
Channels
- # adventofcode (11)
- # architecture (12)
- # beginners (132)
- # boot (19)
- # cider (26)
- # clojure (69)
- # clojure-dusseldorf (4)
- # clojure-gamedev (1)
- # clojure-italy (46)
- # clojure-nl (4)
- # clojure-serbia (1)
- # clojure-switzerland (2)
- # clojure-uk (91)
- # clojurescript (79)
- # css (4)
- # cursive (2)
- # datomic (16)
- # docs (9)
- # duct (20)
- # editors (94)
- # fulcro (15)
- # graphql (2)
- # hoplon (1)
- # instaparse (7)
- # jobs (3)
- # lein-figwheel (3)
- # leiningen (2)
- # lumo (40)
- # mount (35)
- # off-topic (19)
- # reagent (18)
- # reitit (1)
- # shadow-cljs (123)
- # specter (7)
- # sql (5)
- # test-check (4)
- # tools-deps (38)
- # vim (20)
- # yada (9)
is there a way to shutdown a datomic cloud client? I've found that when I create a datomic cloud client in a script, my script will hang instead of exiting. I tried to call shutdown-agents
but that didn't work
can you thread dump and see what threads are still alive?
I found someone with a helpful blog post: https://puredanger.github.io/tech.puredanger.com/2010/05/30/clojure-thread-tricks/
(def d-client (datomic.init/init-client (datomic.init/conn-config)))
Reflection warning, cognitect/hmac_authn.clj:80:12 - call to static method encodeHex on org.apache.commons.codec.binary.Hex can't be resolved (argument types: unknown, java.lang.Boolean).
Reflection warning, cognitect/hmac_authn.clj:80:3 - call to java.lang.String ctor can't be resolved.
2018-05-24 12:11:56.637:INFO::main: Logging initialized @12428ms
=> #'price-alerts.query-test/d-client
(shutdown-agents)
=> nil
(prn
(.dumpAllThreads
(java.lang.management.ManagementFactory/getThreadMXBean)
false
false))
#object["[Ljava.lang.management.ThreadInfo;" 0x5ebe1552 "[Ljava.lang.management.ThreadInfo;@5ebe1552"]
=> nil
(on-exit (fn* [] (prn "done.....")))
=> nil
if you’re in a repl, just ctrl-\
this is in Stu's transcriptor, but I've noticed the same hanging behavior in all my clj
run tasks that start up a datomic client
For test purposes, I am able to start/stop peer servers by running/killing the run
script and its child java process by calling the OS shell from clojure. It's an ugly solution, probably OS-dependent, and every call to run
takes a fair amount of time to complete. Dev/test processes would be facilitated if I could run just one peer server process and create/delete mem DBs programatically.
I'm using datomic cloud, not the peer server, so I don't have a run
script in my case
is that ctrl-\ documented somewhere? I’d never heard of it until today.. wondering if there’s more 🙂
I don’t think there are any other standard handlers other than ctrl-c
and most Clojure repls use ctrl-d to quit (although some use ctrl-c)