Skip to content

Commit a9b74b6

Browse files
committed
Add export progress stats log
1 parent cae588f commit a9b74b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sonar/projects.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,9 @@ def __export_thread(queue: Queue[Project], results: dict[str, str], export_setti
14131413
results[project.key].pop("key", None)
14141414
with _CLASS_LOCK:
14151415
export_settings["EXPORTED"] += 1
1416-
log.info("%d/%d projects exported", export_settings["EXPORTED"], export_settings["NBR_PROJECTS"])
1416+
nb, tot = export_settings["EXPORTED"], export_settings["NBR_PROJECTS"]
1417+
if nb % 10 == 0 or nb == tot:
1418+
log.info("%d/%d projects exported (%d%%)", nb, tot, (nb * 100) // tot)
14171419
queue.task_done()
14181420

14191421

0 commit comments

Comments
 (0)