Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Aug 27, 2024
1 parent 25582eb commit ff8e802
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions machine/jobs/build_word_alignment_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
logger = logging.getLogger(str(__package__) + ".build_word_alignment_model")


def run(args: dict) -> WordAlignmentBuildJob:
def run(args: dict):
progress: Callable[[ProgressStatus], None]
check_canceled: Optional[Callable[[], None]] = None
task = None
Expand Down Expand Up @@ -78,14 +78,14 @@ def run(args: dict) -> WordAlignmentBuildJob:
except Exception as e:
if task:
if task.get_status() == "stopped":
return word_alignment_build_job
return
else:
task.mark_failed(status_reason=type(e).__name__, status_message=str(e))
raise e
finally:
if scheduler is not None:
scheduler.stop()
return word_alignment_build_job
return


def main() -> None:
Expand Down

0 comments on commit ff8e802

Please sign in to comment.