mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
disable snapshot as it's memory consume
This commit is contained in:
@@ -185,14 +185,14 @@
|
||||
:t (t-now self)
|
||||
:txs txs}))
|
||||
|
||||
;; FIXME: memory limit
|
||||
(defn- snapshot-response [^js self]
|
||||
(let [conn (.-conn self)
|
||||
db @conn
|
||||
datoms (protocol/datoms->wire (d/datoms db :eavt))]
|
||||
{:type "snapshot/ok"
|
||||
:t (t-now self)
|
||||
:datoms (common/write-transit datoms)}))
|
||||
;; FIXME: memory limit, should re-download graph using sqlite table rows
|
||||
;; (defn- snapshot-response [^js self]
|
||||
;; (let [conn (.-conn self)
|
||||
;; db @conn
|
||||
;; datoms (protocol/datoms->wire (d/datoms db :eavt))]
|
||||
;; {:type "snapshot/ok"
|
||||
;; :t (t-now self)
|
||||
;; :datoms (common/write-transit datoms)}))
|
||||
|
||||
(defn- import-snapshot! [^js self rows reset?]
|
||||
(let [sql (.-sql self)]
|
||||
@@ -302,8 +302,8 @@
|
||||
(let [since (or (:since message) 0)]
|
||||
(send! ws (pull-response self since)))
|
||||
|
||||
"snapshot"
|
||||
(send! ws (snapshot-response self))
|
||||
;; "snapshot"
|
||||
;; (send! ws (snapshot-response self))
|
||||
|
||||
"tx"
|
||||
(let [tx-data (protocol/transit->tx (:tx message))
|
||||
|
||||
3
deps/worker-sync/worker/README.md
vendored
3
deps/worker-sync/worker/README.md
vendored
@@ -31,8 +31,9 @@ Client -> Server:
|
||||
- `{ "type": "hello", "client": "...", "since": 0 }`
|
||||
- `{ "type": "tx", "client": "...", "t_before": 0, "tx": "<transit>" }`
|
||||
- `{ "type": "pull", "since": 0 }`
|
||||
- `{ "type": "snapshot" }`
|
||||
- `{ "type": "ping" }`
|
||||
<!-- - `{ "type": "snapshot" }` -->
|
||||
|
||||
|
||||
Server -> Client:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user