Skip to content

Commit c995e93

Browse files
committed
changed ttl api to a post
1 parent 6ef6422 commit c995e93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sliderule/sliderule.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,13 @@ def update_available_servers (desired_nodes=None, time_to_live=None):
573573

574574
# Update number of nodes
575575
if type(desired_nodes) == int:
576+
headers = __build_auth_header()
576577
if type(time_to_live) == int:
577578
host = "https://ps." + service_url + "/api/desired_org_num_nodes_ttl/" + service_org + "/" + str(desired_nodes) + "/" + str(time_to_live) + "/"
579+
rsps = session.post(host, headers=headers, timeout=request_timeout)
578580
else:
579581
host = "https://ps." + service_url + "/api/desired_org_num_nodes/" + service_org + "/" + str(desired_nodes) + "/"
580-
headers = __build_auth_header()
581-
rsps = session.put(host, headers=headers, timeout=request_timeout)
582+
rsps = session.put(host, headers=headers, timeout=request_timeout)
582583
rsps.raise_for_status()
583584

584585
# Get number of nodes currently registered

0 commit comments

Comments
 (0)