Fork me on GitHub
#luminus
<
2018-02-16
>
mihaelkonjevic20:02:03

@yogthos ok, but how do you handle sending email out of the request - response cycle? Or is postal handling that automattically?

yogthos20:02:03

and I use selmer to make the email templates

yogthos20:02:25

ah I use core.async for most IO stuff

mihaelkonjevic20:02:05

ah, makes sense. I’ll be working on my first clojure/luminus project soon (which I’m very much looking forward to), so I’ll have a lot of questions 😄

mihaelkonjevic20:02:24

Switching from CLJS will be an interesting change

yogthos20:02:46

so something like this should do the trick:

(defstate  email-channel
  :start (a/chan 10))

(defstate email-loop
  :start (a/go-loop []
           (when-some [email (a/<! email-channel)]
             (postal/send-message email)
             (recur))))

mihaelkonjevic20:02:04

awesome, that’s what I was looking for

yogthos20:02:18

questions and suggestions are always welcome 🙂

feihong21:02:32

i have a luminus project created with +postgres, so it has the init and various migrate commands. i tried to add my own command, but when i try to run lein repl, it errors out with REPL server launch timed out.. apparently there were problems with compilation. The start of the error stack trace is:

Exception in thread "main" java.lang.ExceptionInInitializerError
	at clojure.main.<clinit>(main.java:20)
Caused by: java.lang.ClassNotFoundException: quickstart.populate, compiling:(quickstart/core.clj:64:7)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
...