locust-cloud 1.0.5__py3-none-any.whl → 1.0.6__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.
@@ -25,7 +25,7 @@ def safe_serialize(obj):
25
25
  class Timescale:
26
26
  def __init__(self, environment: locust.env.Environment, pg_user, pg_host, pg_password, pg_database, pg_port):
27
27
  self.env = environment
28
- self._run_id = ""
28
+ self._run_id = None
29
29
  self._samples: list[dict] = []
30
30
  self._background = gevent.spawn(self._run)
31
31
  self._hostname = socket.gethostname()
@@ -75,7 +75,7 @@ class Timescale:
75
75
 
76
76
  def on_test_start(self, environment: locust.env.Environment):
77
77
  if not self.env.parsed_options or not self.env.parsed_options.worker:
78
- environment._run_id = datetime.now(UTC) # type: ignore
78
+ self._run_id = environment._run_id = datetime.now(UTC) # type: ignore
79
79
  msg = environment._run_id.strftime("%Y-%m-%d, %H:%M:%S.%f") # type: ignore
80
80
  if environment.runner is not None:
81
81
  logging.debug(f"about to send run_id to workers: {msg}")