mirror of https://github.com/logseq/logseq
fix(sync): validate rsapi upload err
when localtime incorrect, aws s3 return "Request is not yet valid" errpull/9353/head
parent
8d46b5cb23
commit
adef15d073
|
@ -371,6 +371,8 @@
|
||||||
|
|
||||||
:file-sync/other-user-graph "Current local graph is bound to other user's remote graph. So can't start syncing."
|
:file-sync/other-user-graph "Current local graph is bound to other user's remote graph. So can't start syncing."
|
||||||
:file-sync/graph-deleted "The current remote graph has been deleted"
|
:file-sync/graph-deleted "The current remote graph has been deleted"
|
||||||
|
:file-sync/rsapi-cannot-upload-err "Unable to start synchronization, please check if the local time is correct."
|
||||||
|
|
||||||
|
|
||||||
:notification/clear-all "Clear all"}
|
:notification/clear-all "Clear all"}
|
||||||
|
|
||||||
|
@ -1683,6 +1685,7 @@
|
||||||
|
|
||||||
:file-sync/other-user-graph "当前本地图谱绑定在其他用户的远程图谱上。因此无法启动同步。"
|
:file-sync/other-user-graph "当前本地图谱绑定在其他用户的远程图谱上。因此无法启动同步。"
|
||||||
:file-sync/graph-deleted "当前远程图谱已经删除"
|
:file-sync/graph-deleted "当前远程图谱已经删除"
|
||||||
|
:file-sync/rsapi-cannot-upload-err "无法同步,请检查本机时间是否准确"
|
||||||
|
|
||||||
:notification/clear-all "清除全部通知"}
|
:notification/clear-all "清除全部通知"}
|
||||||
|
|
||||||
|
|
|
@ -1680,6 +1680,10 @@
|
||||||
[r]
|
[r]
|
||||||
(some->> (ex-cause r) str (re-find #"graph-not-exist")))
|
(some->> (ex-cause r) str (re-find #"graph-not-exist")))
|
||||||
|
|
||||||
|
(defn- stop-sync-by-rsapi-response?
|
||||||
|
[r]
|
||||||
|
(some->> (ex-cause r) str (re-find #"Request is not yet valid")))
|
||||||
|
|
||||||
|
|
||||||
;; type = "change" | "add" | "unlink"
|
;; type = "change" | "add" | "unlink"
|
||||||
(deftype FileChangeEvent [type dir path stat checksum]
|
(deftype FileChangeEvent [type dir path stat checksum]
|
||||||
|
@ -2594,6 +2598,11 @@
|
||||||
(do (println :graph-has-been-deleted r*)
|
(do (println :graph-has-been-deleted r*)
|
||||||
{:graph-has-been-deleted true})
|
{:graph-has-been-deleted true})
|
||||||
|
|
||||||
|
(stop-sync-by-rsapi-response? r*)
|
||||||
|
(do (println :stop-sync-caused-by-rsapi-err-response r*)
|
||||||
|
(notification/show! (t :file-sync/rsapi-cannot-upload-err) :warning false)
|
||||||
|
{:stop true})
|
||||||
|
|
||||||
paused?
|
paused?
|
||||||
{:pause true}
|
{:pause true}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue