ソースを参照

add more debug info

Tienson Qin 2 ヶ月 前
コミット
f183b6df01
1 ファイル変更5 行追加1 行削除
  1. 5 1
      src/main/mobile/init.cljs

+ 5 - 1
src/main/mobile/init.cljs

@@ -64,7 +64,10 @@
 (defn- app-state-change-handler
   "NOTE: don't add more logic in this listener, use mobile-flows instead"
   [^js state]
-  (println :debug :app-state-change-handler state (js/Date.))
+  (println :debug :app-state-change-handler state (js/Date.)
+           :current-graph (state/get-current-repo)
+           :app-active? (.-isActive state)
+           :worker-client-id @state/*db-worker-client-id)
   (when (state/get-current-repo)
     (let [is-active? (.-isActive state)]
       (if (not is-active?)
@@ -74,6 +77,7 @@
           (->
            (p/timeout
             (p/let [{:keys [available?]} (state/<invoke-db-worker :thread-api/check-worker-status (state/get-current-repo))]
+              (log/info ::check-worker-state {:available? available?})
               (when-not available?
                 (js/window.location.reload)))
             500)