-
Notifications
You must be signed in to change notification settings - Fork 22
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
enable parametrization of Service instances within a single Golem.run_service()
call
#514
Conversation
…n_service()` call + use of service parametrization in `simple-service-poc`
Golem.run_service()
callGolem.run_service()
call
yapapi/golem.py
Outdated
:param num_instances: optional number of service instances to run. Defaults to a single | ||
instance, unless `instance_params` is given, in which case, the Cluster will be created | ||
with as many instances as there are elements in the `instance_params` iterable. | ||
:param instance_params: optional list of dictionaries of keyword arguments that will be passed | ||
to consecutive, spawned instances. The number of elements in the iterable determines the | ||
number of instances spawned, unless `num_instances` is given, in which case the latter takes | ||
precedence. | ||
In other words, if both `num_instances` and `instance_params` are provided, | ||
the Cluster will be created with the number of instances determined by `num_instances` | ||
and if there are too few elements in the `instance_params` iterable, it will results in | ||
an 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.
👍
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.
my pleasure :)
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.
Nice! My only concern is that is conflicts with changes made in b0.6
with #509 (for example, both PR's modify signature of Cluster._run_instance()
), perhaps it would be better to merge b0.6
with master
before merging this PR?
we can do either, and i'd merge this one first for the sake of planning ;) |
enable parametrization of Service instances within a single
Golem.run_service()
callsimple-service-poc
closes #372