mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 04:41:40 +02:00
✨ Send version and build data to worker configuration
This commit is contained in:
parent
5cb39874a2
commit
6b3a988526
3 changed files with 20 additions and 10 deletions
|
@ -17,8 +17,10 @@
|
|||
[]
|
||||
(let [worker (uw/init cf/worker-uri err/on-error)]
|
||||
(uw/ask! worker {:cmd :configure
|
||||
:key :public-uri
|
||||
:val cf/public-uri})
|
||||
:config {:public-uri cf/public-uri
|
||||
:build-data cf/build-date
|
||||
:version cf/version}})
|
||||
|
||||
(set! instance worker)))
|
||||
|
||||
(defn ask!
|
||||
|
|
|
@ -50,8 +50,16 @@
|
|||
(handler (assoc message :cmd :snaps/update-page-index))))
|
||||
|
||||
(defmethod handler :configure
|
||||
[{:keys [key val]}]
|
||||
(log/info :hint "configure worker" :key key :val (dm/str val))
|
||||
(case key
|
||||
:public-uri
|
||||
(set! cf/public-uri val)))
|
||||
[{:keys [config]}]
|
||||
(log/info :hint "configure worker" :keys (keys config))
|
||||
|
||||
(when-let [public-uri (get config :public-uri)]
|
||||
(set! cf/public-uri public-uri))
|
||||
|
||||
(when-let [version (get config :version)]
|
||||
(set! cf/version version))
|
||||
|
||||
(when-let [build-date (get config :build-data)]
|
||||
(set! cf/build-date build-date))
|
||||
|
||||
nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue