Skip to content

Commit 7c98c38

Browse files
add some logging
1 parent 0e63770 commit 7c98c38

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

choose_l10n_ci_set.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
import logging
23
import os
34
import random
45
import re
@@ -43,7 +44,6 @@ def add_selected_mappings(mappings):
4344
"""
4445
# sort the mappings by the length of the regions per site
4546
mappings = dict(sorted(mappings.items(), key=lambda val: len(val[1]), reverse=True))
46-
print(mappings)
4747
# place the mappings into 3 containers evenly according to the load
4848
loads = [0, 0, 0]
4949
containers = [[] for _ in range(3)]
@@ -71,10 +71,10 @@ def add_selected_mappings(mappings):
7171
version = 0
7272
# get container index according to beta version
7373
run_idx = version % 3
74+
current_running_mappings = "\n".join(containers[run_idx])
75+
logging.warning(f"Running the mappings:\n{current_running_mappings}")
7476
with open(OUTPUT_FILE, "a+") as f:
75-
for mapping in containers[run_idx]:
76-
print(mapping)
77-
f.write(f"{mapping}\n")
77+
f.write(f"{current_running_mappings}\n")
7878

7979

8080
def process_changed_file(f, selected_mappings):

l10n_CM/run_l10n.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"bijoubrigitte",
4444
"peacocks",
4545
"whittard",
46-
"diy"
46+
"diy",
4747
}
4848

4949
loaded_valid_sites = valid_l10n_mappings().keys()

0 commit comments

Comments
 (0)