Skip to content

Commit a9c45a3

Browse files
authored
feat(shuttle): Pipe connectionTimeout arg through EventStreamHubSubscriber (#2382)
## Why is this change needed? Follow-up to #2367. I missed piping through BaseHubSubscriber's new `connectionTimeout` param through to EventStreamHubSubscriber, which means `connectionTimeout` isn't really configurable for streaming right now like it should be. ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [ ] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [x] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on adding a new optional parameter, `connectionTimeout`, to the `EventStreamHubSubscriber` class, allowing for better control over connection timeouts. ### Detailed summary - Added `connectionTimeout?: number` as an optional parameter in the constructor of `EventStreamHubSubscriber`. - Updated the call to `super` in the constructor to include the new `connectionTimeout` argument. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 5080bbb commit a9c45a3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/itchy-feet-cough.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@farcaster/shuttle": patch
3+
---
4+
5+
feat(shuttle): Pipe connectionTimeout arg through EventStreamHubSubscriber

packages/shuttle/src/shuttle/hubSubscriber.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,10 @@ export class EventStreamHubSubscriber extends BaseHubSubscriber {
217217
eventTypes?: HubEventType[],
218218
totalShards?: number,
219219
shardIndex?: number,
220+
connectionTimeout?: number,
220221
options?: EventStreamHubSubscriberOptions,
221222
) {
222-
super(label, hubClient.client, log, eventTypes, totalShards, shardIndex);
223+
super(label, hubClient.client, log, eventTypes, totalShards, shardIndex, connectionTimeout);
223224
this.eventStream = eventStream;
224225
this.redis = redis;
225226
this.streamKey = `hub:${hubClient.host}:evt:msg:${shardKey}`;

0 commit comments

Comments
 (0)