Skip to content

Commit

Permalink
refactor to use duration for timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-lox committed Dec 11, 2024
1 parent f220fa1 commit 5726ae5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/data_layer/repositories/note_repository_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class NoteRepositoryImpl implements NoteRepository {
filters: [filter],
name: 'getTextNote-',
explicitRelays: explicitRelays,
timeout: 5,
timeout: Duration(seconds: 5),
cacheRead: true,
cacheWrite: true,
);
Expand Down Expand Up @@ -121,7 +121,7 @@ class NoteRepositoryImpl implements NoteRepository {
name: requestId,
cacheRead: true,
cacheWrite: true,
timeout: 5,
timeout: Duration(seconds: 5),
);

return response.stream.map(
Expand Down Expand Up @@ -241,7 +241,7 @@ class NoteRepositoryImpl implements NoteRepository {
);

final response = dartNdkSource.dartNdk.requests.query(
timeout: 2,
timeout: Duration(seconds: 5),
filters: [filter],
name: 'getReactions-${postId.substring(5, 10)}-',
cacheRead: false,
Expand Down Expand Up @@ -277,7 +277,7 @@ class NoteRepositoryImpl implements NoteRepository {
);

final response = dartNdkSource.dartNdk.requests.query(
timeout: 3,
timeout: Duration(seconds: 5),
filters: [filter],
name: 'getReposts',
cacheRead: cacheEnabled,
Expand Down
6 changes: 3 additions & 3 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -914,21 +914,21 @@ packages:
path: "../ndk/packages/ndk"
relative: true
source: path
version: "0.2.0-dev001"
version: "0.2.0-dev005"
ndk_amber:
dependency: "direct main"
description:
path: "../ndk/packages/amber"
relative: true
source: path
version: "0.2.0-dev001"
version: "0.2.0-dev002"
ndk_rust_verifier:
dependency: "direct main"
description:
path: "../ndk/packages/rust_verifier"
relative: true
source: path
version: "0.2.0-dev001"
version: "0.2.0-dev002"
node_preamble:
dependency: transitive
description:
Expand Down

0 comments on commit 5726ae5

Please sign in to comment.