File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -537,7 +537,7 @@ def set_rqst_timeout (timeout):
537
537
#
538
538
# UPDATE_AVAIABLE_SERVERS
539
539
#
540
- def update_available_servers (desired_nodes = None ):
540
+ def update_available_servers (desired_nodes = None , time_to_live = None ):
541
541
'''
542
542
Manages the number of servers in the cluster.
543
543
If the desired_nodes parameter is set, then a request is made to change the number of servers in the cluster to the number specified.
@@ -548,6 +548,8 @@ def update_available_servers (desired_nodes=None):
548
548
----------
549
549
desired_nodes: int
550
550
the desired number of nodes in the cluster
551
+ time_to_live: int
552
+ number of minutes for the desired nodes to run
551
553
552
554
Returns
553
555
-------
@@ -567,6 +569,8 @@ def update_available_servers (desired_nodes=None):
567
569
# Update number of nodes
568
570
if type (desired_nodes ) == int :
569
571
host = "https://ps." + service_url + "/api/desired_org_num_nodes/" + service_org + "/" + str (desired_nodes ) + "/"
572
+ if type (time_to_live ) == int :
573
+ host = host + str (time_to_live ) + "/"
570
574
headers = __build_auth_header ()
571
575
rsps = requests .put (host , headers = headers , timeout = request_timeout )
572
576
rsps .raise_for_status ()
You can’t perform that action at this time.
0 commit comments