Skip to content

feat: allowing multiple intervals#35

Merged
netanelC merged 3 commits into
masterfrom
allow-multi-intervals
Sep 11, 2023
Merged

feat: allowing multiple intervals#35
netanelC merged 3 commits into
masterfrom
allow-multi-intervals

Conversation

@netanelC

Copy link
Copy Markdown
Contributor

This PR allows workers to ping to heartbeat more than just one task.

Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore

@asafMasa asafMasa changed the title chore: allowing multiple intervals feat: allowing multiple intervals Sep 10, 2023

@almog8k almog8k left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job!

Comment thread src/heartbeatClient.ts
if (this.intervalKey !== null) {
clearInterval(this.intervalKey);
this.intervalKey = null;
const interval = this.intervalDictionary[taskId];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to intervalId

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is not intervalID. It is the interval. You can see that the returned type is Timer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, my mistake

Comment thread src/heartbeatClient.ts
if (this.intervalKey !== null) {
clearInterval(this.intervalKey);
this.intervalKey = null;
const interval = this.intervalDictionary[taskId];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here

@netanelC netanelC requested a review from almog8k September 11, 2023 11:57

@ronenkapelian ronenkapelian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job son

@netanelC netanelC merged commit 69640ce into master Sep 11, 2023
@netanelC netanelC deleted the allow-multi-intervals branch September 11, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants