-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
add: scheduler config option for cluster #42308
base: main
Are you sure you want to change the base?
Conversation
286733a
to
645b540
Compare
cbe6731
to
21d893d
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
21d893d
to
581a209
Compare
This comment was marked as outdated.
This comment was marked as outdated.
581a209
to
87bc466
Compare
This comment was marked as outdated.
This comment was marked as outdated.
87bc466
to
9dec344
Compare
This comment was marked as outdated.
This comment was marked as outdated.
9dec344
to
e3980ff
Compare
Opening this for initial review. Will add the docs later after the finalisation. |
e3980ff
to
40302e5
Compare
function validateAndReturnScheduler(scheduler, schedulingPolicy) { | ||
if (scheduler !== undefined) { | ||
if (typeof scheduler.execute !== 'function') { | ||
throw new ERR_CLUSTER_INVALID_SCHEDULER('scheduler.execute'); |
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.
Not sure this warrants a new error code. ERR_INVALID_ARG_TYPE
would probably still work here.
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.
INVALID_ARG_TYPE
seems very broad and that's why i made the choice of ERR_CLUSTER_INVALID_SCHEDULER
. Will update the use to INVALID_ARG_TYPE
.
40302e5
to
8328c98
Compare
It's nice to see this picked back up. Just a word of caution @yashLadha - I don't know how popular |
@cjihrig Sure, reason why i wanted this being i also faced similar issue at one the projects and though if this is part of core cluster then that would be awesome. |
scheduler let's use a custom scheduler function for scheduling workers.
8328c98
to
5cbeb35
Compare
This is a WIP PR for adding custom scheduler to cluster.
Will add the doc changes later after the finalisation of structure in PR.