mirror of
https://github.com/penpot/penpot.git
synced 2025-02-14 19:19:09 -05:00
✨ Improvements on backend application initialization.
On repl and on production environment.
This commit is contained in:
parent
f245656c0c
commit
566fa9cb91
5 changed files with 11 additions and 13 deletions
|
@ -60,9 +60,6 @@
|
||||||
mockery/mockery {:mvn/version "0.1.4"}}
|
mockery/mockery {:mvn/version "0.1.4"}}
|
||||||
:extra-paths ["tests"]}
|
:extra-paths ["tests"]}
|
||||||
|
|
||||||
:repl
|
|
||||||
{:main-opts ["-m" "rebel-readline.main"]}
|
|
||||||
|
|
||||||
:tests
|
:tests
|
||||||
{:extra-deps {lambdaisland/kaocha {:mvn/version "0.0-581"}}
|
{:extra-deps {lambdaisland/kaocha {:mvn/version "0.0-581"}}
|
||||||
:main-opts ["-m" "kaocha.runner"]}
|
:main-opts ["-m" "kaocha.runner"]}
|
||||||
|
|
|
@ -16,17 +16,18 @@
|
||||||
(let [m (System/getProperty "uxbox.enable-asserts")]
|
(let [m (System/getProperty "uxbox.enable-asserts")]
|
||||||
(or (nil? m) (= "true" m))))
|
(or (nil? m) (= "true" m))))
|
||||||
|
|
||||||
;; Set value for current thread binding.
|
|
||||||
(set! *assert* (enable-asserts nil))
|
|
||||||
|
|
||||||
;; Set value for all new threads bindings.
|
;; Set value for all new threads bindings.
|
||||||
(alter-var-root #'*assert* enable-asserts)
|
(alter-var-root #'*assert* enable-asserts)
|
||||||
|
|
||||||
|
;; Set value for current thread binding.
|
||||||
|
(set! *assert* (enable-asserts nil))
|
||||||
|
|
||||||
;; --- Entry point
|
;; --- Entry point
|
||||||
|
|
||||||
(defn -main
|
(defn -main
|
||||||
[& args]
|
[& args]
|
||||||
(load "uxbox/config"
|
(require 'uxbox.config
|
||||||
"uxbox/migrations"
|
'uxbox.migrations
|
||||||
"uxbox/http")
|
'uxbox.http
|
||||||
|
'uxbox.tasks)
|
||||||
(mount/start))
|
(mount/start))
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
[uxbox.tasks.demo-gc]
|
[uxbox.tasks.demo-gc]
|
||||||
[uxbox.tasks.sendmail]
|
[uxbox.tasks.sendmail]
|
||||||
[uxbox.tasks.impl :as impl]
|
[uxbox.tasks.impl :as impl]
|
||||||
|
[uxbox.util.time :as dt]
|
||||||
[vertx.core :as vc]
|
[vertx.core :as vc]
|
||||||
[vertx.timers :as vt]))
|
[vertx.timers :as vt]))
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@
|
||||||
|
|
||||||
(def ^:private schedule
|
(def ^:private schedule
|
||||||
[{:id "every 1 hour"
|
[{:id "every 1 hour"
|
||||||
:cron #uxbox/cron "1 1 */1 * * ? *"
|
:cron (dt/cron "1 1 */1 * * ? *")
|
||||||
:fn #'uxbox.tasks.demo-gc/handler
|
:fn #'uxbox.tasks.demo-gc/handler
|
||||||
:props {:foo 1}}])
|
:props {:foo 1}}])
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,7 @@
|
||||||
[criterium.core :refer [quick-bench bench with-progress-reporting]]
|
[criterium.core :refer [quick-bench bench with-progress-reporting]]
|
||||||
[promesa.core :as p]
|
[promesa.core :as p]
|
||||||
[promesa.exec :as pe]
|
[promesa.exec :as pe]
|
||||||
[mount.core :as mount]
|
[mount.core :as mount]))
|
||||||
[uxbox.main]))
|
|
||||||
|
|
||||||
;; --- Benchmarking Tools
|
;; --- Benchmarking Tools
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@
|
||||||
|
|
||||||
(defn process-changes
|
(defn process-changes
|
||||||
[data items]
|
[data items]
|
||||||
(->> (us/assert ::changes items)
|
(->> (us/verify ::changes items)
|
||||||
(reduce process-change data)))
|
(reduce process-change data)))
|
||||||
|
|
||||||
(defn- process-change
|
(defn- process-change
|
||||||
|
|
Loading…
Add table
Reference in a new issue