Skip to content

Commit

Permalink
fixes progressbar handling
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Apr 17, 2024
1 parent bf0b2a7 commit 2ffb18d
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions frontend/wikigrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,20 +140,22 @@ def check_version(self, wiki_url):
async def perform_wiki_checks(self, _msg):
await run.io_bound(self.run_wiki_checks)

def run_wiki_checks(self, progress_bar: Progressbar = None):
def run_wiki_checks(self):
"""
perform the selected wiki checks
"""
progress_bar=self.progressbar
try:
progress_bar.reset()
for wiki_state in self.wikistates_by_row_no.values():
for wiki_check in self.wiki_checks:
if wiki_check.checked:
wiki_check.func(wiki_state)
self.lod_grid.update()
if progress_bar:
# Update the progress bar
progress_bar.update(1)
with self.solution.content_div:
progress_bar.reset()
for wiki_state in self.wikistates_by_row_no.values():
for wiki_check in self.wiki_checks:
if wiki_check.checked:
wiki_check.func(wiki_state)
self.lod_grid.update()
if progress_bar:
# Update the progress bar
progress_bar.update(1)
except BaseException as ex:
self.solution.handle_exception(ex)

Expand Down

0 comments on commit 2ffb18d

Please sign in to comment.