Commit Graph

105 Commits

Author SHA1 Message Date
Abdullah Atta
088235a46d web: add support for disabling sync & auto sync 2023-01-03 21:46:11 +05:00
Abdullah Atta
f1a2afd9d6 core: do not sync vault key alone
this caused a sync loop because vault key is always synced regardless of
whether it has changed or not.
2022-12-02 11:24:56 +05:00
Abdullah Atta
0c0dff3b28 core: fix "Cannot send data if connection is not in "Connected" state" 2022-11-23 12:19:12 +05:00
Abdullah Atta
3ab6c4646c core: use mutex to establish only 1 connection at a time 2022-11-23 12:19:12 +05:00
Abdullah Atta
349cd27650 core: refactor collector to do everything in 1 step
This will speed up the sync slightly since we aren't iterating over all
items twice. It also simplifies the code a bit.
2022-11-10 14:38:32 +05:00
Abdullah Atta
7b458a56b2 core: revert "make sync hub connection more reliable" 2022-10-26 08:51:18 +05:00
Abdullah Atta
73b09847b8 core: make sync hub connection more reliable 2022-10-17 22:46:31 +05:00
Ammar Ahmed
e5e965415d feat: realtime & auto sync for all users (#944) 2022-09-20 18:33:55 +05:00
Abdullah Atta
ca0d746966 core: fail fast if sync connection fails
this adds reslience to the sync logic in cases where network
isn't responding or is very slow to respond. Previously there were
cases where the sync would get stuck in Connecting state.
This will no longer happen.
2022-09-19 16:20:12 +05:00
ammarahm-ed
c8dc5207b4 core: fix auto sync does not send sync complete event 2022-09-08 18:30:49 +05:00
Abdullah Atta
201366b39e core: get rid of noteIds in notebook topics
This is a BREAKING change in the core & will require updating the
clients. The way it works is instead of keeping noteIds of all the
notes in the topic, it keeps an in-memory cache. This in-memory
cache `topicReferences` lives in the notes collection & decouples
notes from notebooks/topics. This also simplifies all the different
actions where references would persist after the note was deleted.
Since the note acts as the source of truth for where it currently is,
there is nothing else to do except rebuild the `topicReferences`
cache.
2022-09-08 13:39:06 +05:00
Abdullah Atta
d81f5dba65 refactor: migrate to theme-ui from rebass 2022-08-31 07:26:27 +05:00
Abdullah Atta
c317774c8a docs: add license header 2022-08-30 16:17:04 +05:00
thecodrr
f1ceecf982 fix: log error (as warning) during connection check 2022-08-16 09:23:49 +05:00
thecodrr
e4b1399d45 fix: refresh monographs on sync complete 2022-08-15 19:08:43 +05:00
thecodrr
cf9bad7db8 fix: content type being set to "content" during sync
this bug broke export/publishing & basically
everything that depends on content type
to function.
2022-08-06 10:45:15 +05:00
thecodrr
b4db7d5923 fix: avoid sync locking 2022-07-20 17:39:02 +05:00
thecodrr
e0d2cbc019 fix: make sure connection is disconnected before reconnecting 2022-07-20 16:55:48 +05:00
thecodrr
93be4c7e31 fix: reconnect synchub if connection has been closed 2022-07-20 16:47:29 +05:00
thecodrr
32d4cfa594 feat: disable interruptible syncing 2022-07-20 07:19:48 +05:00
thecodrr
530a1cc625 feat: add log messages all over the place 2022-07-19 11:16:46 +05:00
thecodrr
732ef2cac8 fix: check for conflicts before syncing 2022-07-15 15:48:13 +05:00
thecodrr
27dade850a fix: properly handle concurrent syncs 2022-07-09 21:24:18 +05:00
thecodrr
e67ee7534e fix: throw error if sync is already in progress 2022-07-08 12:13:03 +05:00
thecodrr
f774948838 fix: speed up sync by skipping negotiation 2022-04-14 01:10:46 +05:00
thecodrr
7b57b0b916 fix: parse & throw json errors from signalr errors 2022-04-13 16:46:19 +05:00
thecodrr
0a7f80cad5 fix: data collection & upload progress on sync 2022-04-01 20:03:00 +05:00
thecodrr
f8bb3d2d71 fix: improve fetch items progress 2022-04-01 14:50:12 +05:00
thecodrr
d2e6cffa55 fix: resolve if device synced 2022-04-01 10:38:43 +05:00
thecodrr
9378a205d7 fix: make fetch queue properly async 2022-03-31 17:14:09 +05:00
thecodrr
c234c87a76 feat: use messagepack for syncing 2022-03-31 16:18:34 +05:00
thecodrr
2d6824cc73 fix: set last synced time from server if there is nothing to sync locally 2022-03-31 11:37:13 +05:00
thecodrr
baa2b8ab81 fix: incorrect upload progress 2022-03-31 10:33:38 +05:00
thecodrr
e02f368f4c fix: force sync & sync progress 2022-03-31 09:40:51 +05:00
thecodrr
054cd5e8f2 fix: wait for fetching to complete 2022-03-31 00:08:21 +05:00
thecodrr
32a2d79409 fix: process sync items after fetch completes 2022-03-30 23:16:38 +05:00
thecodrr
2cbe8dffd8 feat: make sync more resilient 2022-03-30 20:45:16 +05:00
thecodrr
4db686d7f8 fix: generate id per sync instead of using connection id 2022-03-30 16:52:09 +05:00
thecodrr
854b45f8fc fix: clear sync queue on finish 2022-03-30 16:36:21 +05:00
thecodrr
4135028137 feat: improve sync over websockets 2022-03-30 15:52:48 +05:00
thecodrr
ffd71b2cae fix: allow concurrent sync 2022-03-28 15:00:27 +05:00
thecodrr
91ae3bc581 fix: ignore newly synced items 2022-03-28 13:31:18 +05:00
thecodrr
e81be52386 fix: run sync on realtime sync completed 2022-03-28 13:08:28 +05:00
thecodrr
e727974951 fix: close signalr connection on stop 2022-03-28 10:54:13 +05:00
thecodrr
ebe06bd4e0 fix: encrypt items before sync 2022-03-28 10:45:41 +05:00
thecodrr
a3bc778660 Merge branch 'master' into websockets-encrypted-sync 2022-03-28 10:17:18 +05:00
thecodrr
756efd3af1 feat: auto sync on sse connect 2022-03-08 13:17:24 +05:00
thecodrr
9d097b11cb feat: mark att. as failed on error 2022-02-28 13:05:51 +05:00
thecodrr
954de78de4 fix: include uploading att. in partial sync 2022-02-28 13:02:04 +05:00
thecodrr
1af0558dc6 feat: add sync resumability 2022-02-10 16:10:54 +05:00