Skip to content

Commit c7ccc1f

Browse files
jsnshrmnkatydidnot
authored andcommitted
Add retry logic for all management commands
- use tenacity library - log at INFO level - Remove some exception handling in linksearchtotal_collect command to enable retry Bug: T403209 Change-Id: Idd17a703d4bf64a0aa46eef875938dad6ef681e7
1 parent 1d1feec commit c7ccc1f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

extlinks/aggregates/management/helpers/aggregate_archive_command.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,11 @@ def archive(
377377

378378
for k, v in splits.items():
379379
params = "_".join(map(lambda x: str(x), k))
380+
file_name_without_extension = os.path.splitext(self.name.lower())[0]
381+
aggregate_type = file_name_without_extension.replace("archive", "").replace("_", "")[:-1]
380382
filename = os.path.join(
381383
output_dir,
382-
f"aggregates_{self.name.lower()}_{params}.json.gz",
384+
f"aggregates_{aggregate_type}_{params}.json.gz",
383385
)
384386
self.log_msg(
385387
"Dumping %d %s records into %s",

0 commit comments

Comments
 (0)