refactor(fs): rework on electron fs

This commit is contained in:
Andelf
2023-03-11 12:18:52 +08:00
parent 50585d215f
commit d666a6d35a
10 changed files with 60 additions and 41 deletions

View File

@@ -2705,7 +2705,7 @@
Object
(schedule [this next-state args reason]
{:pre [(s/valid? ::state next-state)]}
(println "[SyncManager" graph-uuid "]"
(println (str "[SyncManager " graph-uuid "]")
(and state (name state)) "->" (and next-state (name next-state)) :reason reason :local-txid @*txid :now (tc/to-string (t/now)))
(set! state next-state)
(swap! *sync-state sync-state--update-state next-state)
@@ -3095,7 +3095,7 @@
(defn <sync-stop []
(go
(when-let [sm ^SyncManager (state/get-file-sync-manager (state/get-current-file-sync-graph-uuid))]
(println "[SyncManager" (:graph-uuid sm) "]" "stopping")
(println (str "[SyncManager " (:graph-uuid sm) "]") "stopping")
(state/clear-file-sync-state! (:graph-uuid sm))
@@ -3103,7 +3103,7 @@
(reset! *sync-entered? false)
(println "[SyncManager" (:graph-uuid sm) "]" "stopped"))
(println (str "[SyncManager " (:graph-uuid sm) "]") "stopped"))
(reset! current-sm-graph-uuid nil)))