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

🧹 decouple checkin from service startup #1487

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Conversation

imilchev
Copy link
Member

Make sure the check-in is not blocking service startup. It now happens in the background

@@ -17,7 +17,7 @@ import (
)

func Serve(timer time.Duration, splay time.Duration, handler JobRunner) {
isIntSess, err := svc.IsAnInteractiveSession()
isIntSess, err := svc.IsWindowsService()
Copy link
Member Author

Choose a reason for hiding this comment

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

this call is deprecated so I replaced it with its successor

Copy link
Contributor

Test Results

  1 files  ±0   26 suites  ±0   19s ⏱️ -1s
490 tests ±0  489 ✅ ±0  1 💤 ±0  0 ❌ ±0 
491 runs  ±0  490 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 10d4596. ± Comparison against base commit 13003d2.

Copy link
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

Thank you @imilchev

@@ -43,7 +43,9 @@ func (c *checkinPinger) Start() {
}

// run check-in once on startup
runCheckIn()
go func() {
runCheckIn()
Copy link
Member

Choose a reason for hiding this comment

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

do we need to protect us from running multiple of those go routines in parallel? This should always only run once, we do not need to queue

@imilchev imilchev merged commit eafe0a9 into main Nov 20, 2024
15 checks passed
@imilchev imilchev deleted the ivan/decouple-checker branch November 20, 2024 13:20
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants