locust-cloud 1.15.3__py3-none-any.whl → 1.16.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- locust_cloud/args.py +1 -1
- locust_cloud/cloud.py +19 -5
- {locust_cloud-1.15.3.dist-info → locust_cloud-1.16.0.dist-info}/METADATA +1 -1
- {locust_cloud-1.15.3.dist-info → locust_cloud-1.16.0.dist-info}/RECORD +6 -6
- {locust_cloud-1.15.3.dist-info → locust_cloud-1.16.0.dist-info}/WHEEL +0 -0
- {locust_cloud-1.15.3.dist-info → locust_cloud-1.16.0.dist-info}/entry_points.txt +0 -0
locust_cloud/args.py
CHANGED
@@ -70,7 +70,7 @@ def transfer_encode(file_name: str, stream: IO[bytes]) -> dict[str, str]:
|
|
70
70
|
def transfer_encoded_file(file_path: str) -> dict[str, str]:
|
71
71
|
try:
|
72
72
|
with open(file_path, "rb") as f:
|
73
|
-
return transfer_encode(file_path, f)
|
73
|
+
return transfer_encode(os.path.basename(file_path), f)
|
74
74
|
except FileNotFoundError:
|
75
75
|
raise ArgumentTypeError(f"File not found: {file_path}")
|
76
76
|
|
locust_cloud/cloud.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import logging
|
2
2
|
import os
|
3
3
|
import sys
|
4
|
+
import time
|
4
5
|
import webbrowser
|
5
6
|
from threading import Thread
|
6
7
|
|
@@ -91,11 +92,24 @@ def main() -> None:
|
|
91
92
|
if options.extra_files:
|
92
93
|
payload["extra_files"] = options.extra_files
|
93
94
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
95
|
+
for attempt in range(1, 16):
|
96
|
+
try:
|
97
|
+
response = session.post("/deploy", json=payload)
|
98
|
+
js = response.json()
|
99
|
+
|
100
|
+
if response.status_code != 202:
|
101
|
+
# 202 means the stack is currently terminating, so we retry
|
102
|
+
break
|
103
|
+
|
104
|
+
if attempt == 1:
|
105
|
+
logger.info(js["message"])
|
106
|
+
|
107
|
+
time.sleep(2)
|
108
|
+
except requests.exceptions.RequestException as e:
|
109
|
+
logger.error(f"Failed to deploy the load generators: {e}")
|
110
|
+
sys.exit(1)
|
111
|
+
else:
|
112
|
+
logger.error("Your Locust instance is still running, run locust-cloud --delete")
|
99
113
|
sys.exit(1)
|
100
114
|
|
101
115
|
if response.status_code != 200:
|
@@ -1,11 +1,11 @@
|
|
1
1
|
locust_cloud/apisession.py,sha256=AoU0FGQbyH2qbaTmdyoIMBd_lwZimLtihK0gnpAV6c0,4091
|
2
|
-
locust_cloud/args.py,sha256=
|
3
|
-
locust_cloud/cloud.py,sha256=
|
2
|
+
locust_cloud/args.py,sha256=4U_bZaEH1UJR8C7_bH_sX1DRB8m6WBcJh-ewhilFQX0,7118
|
3
|
+
locust_cloud/cloud.py,sha256=3sTw5FSLZBtZkdzHj9VisbAUe_jmQH7yOR7oytFEO-M,6052
|
4
4
|
locust_cloud/common.py,sha256=cFrDVKpi9OEmH6giOuj9HoIUFSBArixNtNHzZIgDvPE,992
|
5
5
|
locust_cloud/input_events.py,sha256=MyxccgboHByICuK6VpQCCJhZQqTZAacNmkSpw-gxBEw,3420
|
6
6
|
locust_cloud/web_login.py,sha256=1j2AQoEM6XVSDtE1q0Ryrs4jFEx07r9IQfZCoFAQXJg,2400
|
7
7
|
locust_cloud/websocket.py,sha256=9Q7nTFuAwVhgW74DlJNcHTZXOQ1drsXi8hX9ciZhWlQ,8998
|
8
|
-
locust_cloud-1.
|
9
|
-
locust_cloud-1.
|
10
|
-
locust_cloud-1.
|
11
|
-
locust_cloud-1.
|
8
|
+
locust_cloud-1.16.0.dist-info/METADATA,sha256=ZKDDbnD72lqnGEgZ-89MfsSJbSvApn_VH2Co7DpX2Yk,528
|
9
|
+
locust_cloud-1.16.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
10
|
+
locust_cloud-1.16.0.dist-info/entry_points.txt,sha256=PGyAb4e3aTsGS3N3VGShDl6VzJaXy7QwsEgsLOC7V00,57
|
11
|
+
locust_cloud-1.16.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|