Closed eigenhombre closed 11 years ago
Yup. This has been going on for a while. I asked you about it a week or so ago. I don't know what's going on; it's clearly outside of the populate function though. In any event your database is populated (I know this isn't what you wanted to hear.)
After a lot of waiting around for lein uberjar
, the following works:
(ns protosite.example
(:use [datomic.api :only [db q] :as d])
(:gen-class))
;; (def uri "datomic:mem://testdb")
(def uri "datomic:free://localhost:4334/testdb")
(defn -main []
(println 1)
(when (d/create-database uri)
(d/connect uri))
(shutdown-agents)
(println 3))
So I will continue to divide-and-conquer this until I figure it out.
Correction - this does NOT work. I neglected to remove testdb
.
http://stackoverflow.com/questions/18179194/simple-datomic-test-program-doesnt-exit
As shown in the updated SO post, the script does eventually exit; it just takes upwards of 70 seconds to do so. No idea at the moment why it takes so long. I have an updated script which I will issue a PR for as soon as I verify it works.
vagrant@precise32:/site$ java -cp target/protosite-0.1.0-SNAPSHOT-standalone.jar protosite.lahman_load Added Schema Added 117560 facts Requesting index left populate ;;; hangs!!! ^Cvagrant@precise32:/site$