This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-13
Channels
- # admin-announcements (17)
- # aleph (1)
- # arachne (2)
- # boot (152)
- # braveandtrue (8)
- # cljs-dev (12)
- # cljsjs (3)
- # cljsrn (1)
- # clojure (105)
- # clojure-austin (1)
- # clojure-belgium (5)
- # clojure-berlin (1)
- # clojure-brasil (5)
- # clojure-canada (2)
- # clojure-dev (6)
- # clojure-gamedev (1)
- # clojure-greece (9)
- # clojure-russia (39)
- # clojure-uk (9)
- # clojurescript (106)
- # component (4)
- # cursive (1)
- # data-science (3)
- # datascript (1)
- # datomic (9)
- # emacs (6)
- # hoplon (92)
- # jobs (1)
- # ldnproclodo (2)
- # lein-figwheel (1)
- # off-topic (19)
- # om (47)
- # om-next (1)
- # onyx (10)
- # other-languages (1)
- # proton (1)
- # re-frame (5)
- # reagent (36)
- # rethinkdb (1)
- # ring (2)
- # rum (1)
- # yada (14)
Hi guys, did you notice this behaviour when running yada/aleph
http server dies immediately
=> https://github.com/ztellman/aleph/issues/238 ?
I'm using now the promise
solution but just checking here for a better/different solution too
@tangrammer: the promise solution is good - you must have >= 1 non-daemon live Threads or the JVM will exit, and it's better for your app to provide that Thread than for a lib like aleph or yada
👍 @mccraigmccraig thanks!
@tangrammer: I haven't noticed it but I'd like to know the circumstances that you're seeing it with because others have complained about it - I haven't given it the proper time it needs
@malcolmsparks: just running lein run
in a normal yada system with a normal main handler
below the handler example
(ns ring.handler
(:require
[com.stuartsierra.component :as component]
[app.config :refer (config)]
[app.system :refer (new-production-system)]
[taoensso.timbre :as log])
(:gen-class))
(def p (promise))
(defn -main []
(let [system (component/start (new-production-system))]
(log/info "System starting")
(log/info "This is your webserver port: " (-> system :webserver :port))
(log/info ":) > Congrats, your system is ready to use!")
system
@p
))
you mean I simple project that uses yada?
I created a simple project recently https://github.com/juxt/mksmarthack and didn't run into any issues
the problem only happens with lein run
or java -jar the-uberjar.jar
that at last use the main entrypoint
i don't see any AOT main class in this mksmarthack project
ah, that makes sense - because I'm probably using boot repl or something, that's the non-daemon thread that's keeping everything running - I understand now, thanks @tangrammer
@malcolmsparks: happy to help
@tangrammer: my solution looks like this: