Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase default sync interval from 1s -> 2m #144

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/web5/src/web5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import type { SyncManager } from '@tbd54566975/web5-user-agent';
import type { DidState, DidMethodApi, DidResolverCache, DwnServiceEndpoint } from '@tbd54566975/dids';

import ms from 'ms';

// import { Web5ProxyAgent } from '@tbd54566975/web5-proxy-agent';
import { Dwn } from '@tbd54566975/dwn-sdk-js';
import { Web5UserAgent, ProfileApi, SyncApi } from '@tbd54566975/web5-user-agent';
Expand Down Expand Up @@ -139,7 +141,7 @@
const connectedDid = profile.did.id;
const web5 = new Web5({ appStorage: appStorage, web5Agent: agent, connectedDid });

Web5.#enqueueNextSync(syncManager, 1_000);
Web5.#enqueueNextSync(syncManager, ms('2m'));

Check warning on line 144 in packages/web5/src/web5.ts

View check run for this annotation

Codecov / codecov/patch

packages/web5/src/web5.ts#L144

Added line #L144 was not covered by tests

return { web5, did: connectedDid };
}
Expand Down