More sync debugging statements
This commit is contained in:
parent
be8007c9e4
commit
52fdc14ee4
@ -168,7 +168,9 @@ export class Client {
|
|||||||
await this.dispatchAppEvent("editor:init");
|
await this.dispatchAppEvent("editor:init");
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.syncService.syncFile(`${this.currentPage!}.md`);
|
this.syncService.syncFile(`${this.currentPage!}.md`).catch((e: any) => {
|
||||||
|
console.error("Interval sync error", e);
|
||||||
|
});
|
||||||
}, pageSyncInterval);
|
}, pageSyncInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,6 +249,7 @@ export class SyncService {
|
|||||||
|
|
||||||
await this.spaceSync.syncFile(snapshot, name, localHash, remoteHash);
|
await this.spaceSync.syncFile(snapshot, name, localHash, remoteHash);
|
||||||
this.eventHook.dispatchEvent("sync:success");
|
this.eventHook.dispatchEvent("sync:success");
|
||||||
|
console.log("File successfully synced", name);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this.eventHook.dispatchEvent("sync:error", e.message);
|
this.eventHook.dispatchEvent("sync:error", e.message);
|
||||||
console.error("Sync error", e);
|
console.error("Sync error", e);
|
||||||
|
Loading…
Reference in New Issue
Block a user