mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-08-26 21:37:05 +00:00
Protect bounded remote activity across app lifecycle
This commit is contained in:
@@ -28,7 +28,15 @@ export class ModuleReplicatorCouchDB extends AbstractModule {
|
||||
fireAndForget(async () => {
|
||||
const canReplicate = await this.services.replication.isReplicationReady(false);
|
||||
if (!canReplicate) return;
|
||||
void this.core.replicator.openReplication(this.settings, continuous, false, false);
|
||||
const openReplication = () =>
|
||||
this.core.replicator.openReplication(this.settings, continuous, false, false);
|
||||
if (continuous) {
|
||||
void openReplication();
|
||||
} else {
|
||||
await this.services.replicator.runBoundedRemoteActivity(openReplication, {
|
||||
label: "replication",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user