Skip to content

Commit 5237439

Browse files
committed
client: init columns by name as needed
1 parent e9b1eb3 commit 5237439

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mpcontribs-client/mpcontribs/client/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ def delete_contributions(self, query: Optional[dict] = None, timeout: int = -1):
16001600
_run_futures(futures, total=total, timeout=timeout)
16011601
left, _ = self.get_totals(query=query)
16021602
deleted = total - left
1603-
self.init_columns()
1603+
self.init_columns(name=query["project"])
16041604
self._reinit()
16051605
toc = time.perf_counter()
16061606
dt = (toc - tic) / 60
@@ -2414,11 +2414,11 @@ def put_future(pk, payload):
24142414
logger.info(
24152415
f"{project_name}: resubmit failed contributions manually"
24162416
)
2417+
self.init_columns(name=project_name)
24172418

2419+
self._reinit()
24182420
toc = time.perf_counter()
24192421
dt = (toc - tic) / 60
2420-
self.init_columns()
2421-
self._reinit()
24222422
logger.info(
24232423
f"It took {dt:.1f}min to submit {total_processed}/{total} contributions."
24242424
)

0 commit comments

Comments
 (0)