Skip to content

Commit e5f20cc

Browse files
Don't create client in dry-run mode
1 parent bbd69eb commit e5f20cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

night_rally/night_rally.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,6 @@ def deactivate_outdated_results(effective_start_date, configuration_name, releas
709709
Sets all results for the same major release version, environment, tag and race_configs_id to active=False except for the records
710710
with the provided effective start date.
711711
"""
712-
from night_rally import client
713-
es = client.create_client(configuration_name)
714712
ts = to_iso8601_short(effective_start_date)
715713
if not environment:
716714
# TODO change release-new (in the comment) to release after cut-over
@@ -777,6 +775,8 @@ def deactivate_outdated_results(effective_start_date, configuration_name, releas
777775
import json
778776
logger.info("Would execute update query script\n%s" % json.dumps(body, indent=2))
779777
else:
778+
from night_rally import client
779+
es = client.create_client(configuration_name)
780780
es.indices.refresh(index="rally-results-*")
781781
res = es.update_by_query(index="rally-results-*", body=body, size=10000)
782782
logger.info("Result: %s" % res)

0 commit comments

Comments
 (0)