-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
feat: allow schedulers to run in a single node #6794
Conversation
cc @kwasniew @sjaanus just FYI cause it's related to schedulers. Maybe you have a candidate for this functionality, but first we're going to test it in enterprise customers with the feature we are developing. Maybe we can wait until it's actually tested to use it elsewhere but just keep it in mind ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the slight mismatch in our down migration, this looks good to me.
Co-authored-by: Christopher Kolstad <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 1 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
() => { | ||
clientMetricsServiceV2.bulkAdd().catch(console.error); | ||
}, | ||
() => clientMetricsServiceV2.bulkAdd().catch(console.error), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Getting better: Large Method
scheduleServices decreases from 137 to 133 lines of code, threshold = 70
About the changes
This PR provides a service that allows a scheduled function to run in a single instance. It's currently not in use but tests show how to wrap a function to make it single-instance:
unleash/src/lib/features/scheduler/job-service.test.ts
Lines 26 to 32 in 65b7080
The key
'test'
is used to identify the group and most likely should have the same name as the scheduled job.