mirror of https://github.com/logseq/logseq
enhance(sync): partition files for <delete-remote-files-control
parent
91d70535ee
commit
410381c820
|
@ -1360,9 +1360,12 @@
|
||||||
IRemoteControlAPI
|
IRemoteControlAPI
|
||||||
(<delete-remote-files-control [this graph-uuid filepaths]
|
(<delete-remote-files-control [this graph-uuid filepaths]
|
||||||
(user/<wrap-ensure-id&access-token
|
(user/<wrap-ensure-id&access-token
|
||||||
(let [current-txid (:TXId (<! (<get-remote-graph this nil graph-uuid)))
|
(let [partitioned-files (partition-all 20 (<! (<encrypt-fnames rsapi graph-uuid filepaths)))]
|
||||||
files (<! (<encrypt-fnames rsapi graph-uuid filepaths))]
|
(loop [[files & others] partitioned-files]
|
||||||
(<! (.<request this "delete_files" {:GraphUUID graph-uuid :TXId current-txid :Files files}))))))
|
(when files
|
||||||
|
(let [current-txid (:TXId (<! (<get-remote-graph this nil graph-uuid)))]
|
||||||
|
(<! (.<request this "delete_files" {:GraphUUID graph-uuid :TXId current-txid :Files files}))
|
||||||
|
(recur others))))))))
|
||||||
|
|
||||||
(comment
|
(comment
|
||||||
(declare remoteapi)
|
(declare remoteapi)
|
||||||
|
|
Loading…
Reference in New Issue