浏览代码

chore(sync): clear code

rcmerci 3 年之前
父节点
当前提交
b4f0405bbc
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 5 6
      src/main/frontend/fs/sync.cljs

+ 5 - 6
src/main/frontend/fs/sync.cljs

@@ -35,16 +35,14 @@
 
 
 
 
 ;;; TODO: add some spec validate
 ;;; TODO: add some spec validate
+;;; TODO: use access-token instead of id-token
+;;; TODO: support stop from applying filetxns from remote
 
 
 (def ws-addr "wss://og96xf1si7.execute-api.us-east-2.amazonaws.com/production?graphuuid=%s")
 (def ws-addr "wss://og96xf1si7.execute-api.us-east-2.amazonaws.com/production?graphuuid=%s")
 
 
 
 
 (def graphs-txid (persist-var/persist-var nil "graphs-txid"))
 (def graphs-txid (persist-var/persist-var nil "graphs-txid"))
 
 
-(def *graph-base-path-map
-  "graph-uuid -> {:repo <repo> :base-path <base-path>}"
-  (volatile! {}))
-
 (defn- ws-stop! [*ws]
 (defn- ws-stop! [*ws]
   (swap! *ws (fn [o] (assoc o :stop true)))
   (swap! *ws (fn [o] (assoc o :stop true)))
   (.close (:ws @*ws)))
   (.close (:ws @*ws)))
@@ -307,7 +305,7 @@
 
 
 (deftype RSAPI []
 (deftype RSAPI []
   IToken
   IToken
-  (get-token [this]                     ;TODO: use access-token
+  (get-token [this]
     (go
     (go
       (or (state/get-auth-id-token)
       (or (state/get-auth-id-token)
           (<! (.refresh-token this)))))
           (<! (.refresh-token this)))))
@@ -491,7 +489,8 @@
           true
           true
           r)))))
           r)))))
 
 
-;;; TODO: support stop from processing
+
+
 (defn- apply-filetxns [^SyncState sync-state graph-uuid base-path filetxns]
 (defn- apply-filetxns [^SyncState sync-state graph-uuid base-path filetxns]
   (go-loop [filetxns* filetxns]
   (go-loop [filetxns* filetxns]
     (when (seq filetxns*)
     (when (seq filetxns*)