mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 21:46:12 +02: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]
|
[app.srepl.helpers :as h]
|
||||||
[clojure.pprint :refer [pprint]]))
|
[clojure.pprint :refer [pprint]]))
|
||||||
|
|
||||||
;; Empty namespace as main entry point for Server REPL
|
|
||||||
|
|
||||||
(defn print-available-tasks
|
(defn print-available-tasks
|
||||||
[system]
|
[system]
|
||||||
(let [tasks (:app.worker/registry system)]
|
(let [tasks (:app.worker/registry system)]
|
||||||
(p/pprint (keys tasks) :level 200)))
|
(p/pprint (keys tasks) :level 200)))
|
||||||
|
|
||||||
|
|
||||||
(defn run-task!
|
(defn run-task!
|
||||||
([system name]
|
([system name]
|
||||||
(run-task! system name {}))
|
(run-task! system name {}))
|
||||||
|
@ -29,4 +26,11 @@
|
||||||
(let [tasks (:app.worker/registry system)]
|
(let [tasks (:app.worker/registry system)]
|
||||||
(if-let [task-fn (get tasks name)]
|
(if-let [task-fn (get tasks name)]
|
||||||
(task-fn params)
|
(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
Add a link
Reference in a new issue