locust-cloud 1.2.10__py3-none-any.whl → 1.2.11__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/__init__.py CHANGED
@@ -12,6 +12,7 @@ PG_HOST = os.environ.get("PG_HOST")
12
12
  PG_PASSWORD = os.environ.get("PG_PASSWORD")
13
13
  PG_DATABASE = os.environ.get("PG_DATABASE")
14
14
  PG_PORT = os.environ.get("PG_PORT", 5432)
15
+ GRAPH_VIEWER = os.environ.get("GRAPH_VIEWER")
15
16
 
16
17
 
17
18
  @events.init_command_line_parser.add_listener
@@ -46,10 +47,10 @@ def add_arguments(parser: LocustArgumentParser):
46
47
 
47
48
  @events.init.add_listener
48
49
  def on_locust_init(environment, **_args):
49
- if not PG_HOST:
50
+ if not (PG_HOST or GRAPH_VIEWER):
50
51
  return
51
52
 
52
- if environment.parsed_options.exporter:
53
+ if not GRAPH_VIEWER and environment.parsed_options.exporter:
53
54
  Timescale(
54
55
  environment,
55
56
  pg_user=PG_USER,