Skip to content
Snippets Groups Projects
Commit d230cc1b authored by Cam Saul's avatar Cam Saul
Browse files

minor cleanup

parent bc97fb68
Branches
Tags
No related merge requests found
......@@ -24,11 +24,10 @@
(def ^:private mongo-connection-options
;; Have to use the Java builder directly since monger's wrapper method doesn't support .serverSelectionTimeout :unamused:
(let [opts (com.mongodb.MongoClientOptions$Builder.)]
(-> opts
(.connectTimeout connection-timeout-ms)
(.serverSelectionTimeout connection-timeout-ms)
(.build))))
(-> (com.mongodb.MongoClientOptions$Builder.)
(.connectTimeout connection-timeout-ms)
(.serverSelectionTimeout connection-timeout-ms)
(.build)))
(defn -with-mongo-connection
"Run F with a new connection (bound to `*mongo-connection*`) to DATABASE.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment