Skip to content

Commit

Permalink
Add regions and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
manueliglesias committed Feb 19, 2020
1 parent f227808 commit 5aa70be
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/datastore/src/sync/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export class SyncEngine {
new Reachability().networkMonitor().subscribe(async ({ online }) => {
this.online = online;
if (online) {
//#region GraphQL Subscriptions
const [
ctlSubsObservable,
dataSubsObservable,
Expand All @@ -151,6 +152,9 @@ export class SyncEngine {
}

logger.log('Realtime ready');
//#endregion

//#region Base & Sync queries
const currentTimeStamp = new Date().getTime();

const modelLastSync: Map<
Expand Down Expand Up @@ -181,8 +185,9 @@ export class SyncEngine {
observer.error(err);
return;
}
//#endregion

// process mutations
//#region process mutations
subscriptions.push(
this.mutationsProcessor
.start()
Expand All @@ -201,8 +206,9 @@ export class SyncEngine {
}
)
);
//#endregion

// TODO: extract to funciton
// TODO: extract to function
subscriptions.push(
dataSubsObservable.subscribe(
([_transformerMutationType, modelDefinition, item]) => {
Expand Down

0 comments on commit 5aa70be

Please sign in to comment.