Skip to content

feat(crons): Add interface for heartbeat checkin #9706

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

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Nov 30, 2023

Resolves #9703

I don't know if this is what we actually want.

@lforst lforst requested a review from AbhiPrasad November 30, 2023 10:59
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Let's add a heartbeat checkin test?

@@ -147,7 +147,7 @@ export class ServerRuntimeClient<
* to create a monitor automatically when sending a check in.
*/
public captureCheckIn(checkIn: CheckIn, monitorConfig?: MonitorConfig, scope?: Scope): string {
const id = checkIn.status !== 'in_progress' && checkIn.checkInId ? checkIn.checkInId : uuid4();
const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4();
Copy link
Contributor

Choose a reason for hiding this comment

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

checkIn.hasOwnProperty('checkInId') might resolve into smaller footprint

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bundle size wise in would be smaller. If you mean performance, I don't know if we should care. I'd assume the engines do their best in any case. This is not the hottest of hot paths and I don't have benchmarks or any documentation indicators what is faster so 🤷

@lforst lforst merged commit 0830866 into develop Nov 30, 2023
@lforst lforst deleted the lforst-heartbeat-checking branch November 30, 2023 15:31
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.

captureCheckIn does not support heartbeat check-ins
3 participants