🔊 Add some logging to worker modules.

This commit is contained in:
Andrey Antukh 2019-08-07 20:13:43 +02:00
parent fada526f5d
commit fcc7351552
2 changed files with 6 additions and 2 deletions

View file

@ -6,12 +6,16 @@
(ns uxbox.worker
(:require [beicon.core :as rx]
[cuerdas.core :as str]
[uxbox.util.transit :as t]
[uxbox.util.uuid :as uuid]
[uxbox.worker.impl :as impl]
[uxbox.worker.align]))
(enable-console-print!)
(defonce id (uuid/random))
(defn- on-message
[event]
(let [message (t/decode (.-data event))]
@ -19,3 +23,5 @@
(defonce _
(.addEventListener js/self "message" on-message))
(println (str/format "Worker with id '%s' is initialized." id))