Fix missed post_work_hook invocation
There are two places where we can be done, depending on the invocation,
so there was a situation where the post_work hook wasn't firing on
completed work.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
diff --git a/grokmirror/pull.py b/grokmirror/pull.py
index 7472298..d205b69 100755
--- a/grokmirror/pull.py
+++ b/grokmirror/pull.py
@@ -1282,6 +1282,8 @@
if not runonce and not len(mws) and q_todo.empty() and q_pull.empty() and time.time() - lastrun >= refresh:
if done:
update_manifest(config, done)
+ if post_work_hook:
+ run_post_work_complete_hook(config)
mw = mp.Process(target=manifest_worker, args=(config, q_mani, nomtime))
nomtime = False
mw.daemon = True