Skip to content

Commit

Permalink
Remove the future from the tracking list once completed
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Feb 2, 2024
1 parent 97f2f32 commit 4783b8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/kolibri2zim/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,14 @@ def create_video_processing_job(
path=path,
preset=preset,
)
future.add_done_callback(self.clean_videos_futures)
# Keep future to track status
self.videos_futures.append(future)

def clean_videos_futures(self, future):
# Remove future now that it has finished
self.videos_futures.remove(future)

def convert_and_add_video(
self, file_id, src_fpath, src_checksum, dest_fpath, path, preset
):
Expand Down

0 comments on commit 4783b8c

Please sign in to comment.