Skip to content

Commit

Permalink
feat: Ignore queries warmup on PouchLink
Browse files Browse the repository at this point in the history
With previous changes, we now expect the CozyPouchLink to be the last
link of the chain, so forwarding the query would result to an exception
thrown

This mean we cannot forward the query when warmup queries are not
finished yet

So we want to allow CozyPouchLink to ignore the verification step and
process the query independently of the warmup queries status

To allow this we introduce the `ignoreWarmup` parameter. When set to
`true` the CozyPouchLink will process the query even if warmup is not
finished yet

Related PR: cozy/cozy-client#1506
  • Loading branch information
Ldoppea committed Dec 11, 2024
1 parent 65841fc commit 50aa22d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pouchdb/getLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export const getLinks = (): CozyLink[] => {
const pouchLinkOptions = {
doctypes: offlineDoctypes,
initialSync: true,
platform: platformReactNative
platform: platformReactNative,
ignoreWarmup: true
}

const stackLink = new StackLink({
Expand Down

0 comments on commit 50aa22d

Please sign in to comment.