mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 09:08:31 -05:00
🎉 Add srepl helper for sending test email
This commit is contained in:
parent
58319d84ad
commit
3c2ba92f6c
1 changed files with 8 additions and 4 deletions
|
@ -14,14 +14,11 @@
|
|||
[app.srepl.helpers :as h]
|
||||
[clojure.pprint :refer [pprint]]))
|
||||
|
||||
;; Empty namespace as main entry point for Server REPL
|
||||
|
||||
(defn print-available-tasks
|
||||
[system]
|
||||
(let [tasks (:app.worker/registry system)]
|
||||
(p/pprint (keys tasks) :level 200)))
|
||||
|
||||
|
||||
(defn run-task!
|
||||
([system name]
|
||||
(run-task! system name {}))
|
||||
|
@ -29,4 +26,11 @@
|
|||
(let [tasks (:app.worker/registry system)]
|
||||
(if-let [task-fn (get tasks name)]
|
||||
(task-fn params)
|
||||
(l/warn :hint "no task found" :name name)))))
|
||||
(println (format "no task '%s' found" name))))))
|
||||
|
||||
(defn send-test-email!
|
||||
[system destination]
|
||||
(let [handler (:app.emails/sendmail system)]
|
||||
(handler {:body "test email"
|
||||
:subject "test email"
|
||||
:to [destination]})))
|
||||
|
|
Loading…
Add table
Reference in a new issue