File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import json
2
+ import logging
2
3
import os
3
4
import random
4
5
import re
@@ -43,7 +44,6 @@ def add_selected_mappings(mappings):
43
44
"""
44
45
# sort the mappings by the length of the regions per site
45
46
mappings = dict (sorted (mappings .items (), key = lambda val : len (val [1 ]), reverse = True ))
46
- print (mappings )
47
47
# place the mappings into 3 containers evenly according to the load
48
48
loads = [0 , 0 , 0 ]
49
49
containers = [[] for _ in range (3 )]
@@ -71,10 +71,10 @@ def add_selected_mappings(mappings):
71
71
version = 0
72
72
# get container index according to beta version
73
73
run_idx = version % 3
74
+ current_running_mappings = "\n " .join (containers [run_idx ])
75
+ logging .warning (f"Running the mappings:\n { current_running_mappings } " )
74
76
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 " )
78
78
79
79
80
80
def process_changed_file (f , selected_mappings ):
Original file line number Diff line number Diff line change 43
43
"bijoubrigitte" ,
44
44
"peacocks" ,
45
45
"whittard" ,
46
- "diy"
46
+ "diy" ,
47
47
}
48
48
49
49
loaded_valid_sites = valid_l10n_mappings ().keys ()
You can’t perform that action at this time.
0 commit comments