diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-09-02 16:17:53 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-09-02 16:17:53 -0400 |
commit | f9cd37a74b2e115088a0ab46d32c4f2518ceb504 (patch) | |
tree | 2f8bae96e140e8b03da6fc823911538c26ca93db | |
parent | b15ac8d6849291dd35944f3f7e7b66d608e99795 (diff) | |
download | grokmirror-f9cd37a74b2e115088a0ab46d32c4f2518ceb504.tar.gz |
Exit subprocess instead of returning
Not sure this makes any difference, but I'm seeing pull workers hanging
around after the queue had been drained and I'm not sure what is the
reason behind that.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-x | grokmirror/pull.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grokmirror/pull.py b/grokmirror/pull.py index 940b130..f4cf0a9 100755 --- a/grokmirror/pull.py +++ b/grokmirror/pull.py @@ -189,7 +189,7 @@ def spa_worker(config, q_spa, pauseonload): try: (gitdir, actions) = q_spa.get(timeout=1) except queue.Empty: - return + sys.exit(0) logger.debug('spa_worker: gitdir=%s, actions=%s', gitdir, actions) fullpath = os.path.join(toplevel, gitdir.lstrip('/')) @@ -247,7 +247,7 @@ def pull_worker(config, q_pull, q_spa, q_done): try: (gitdir, repoinfo, action, q_action) = q_pull.get(timeout=1) except queue.Empty: - return + sys.exit(0) logger.debug('pull_worker: gitdir=%s, action=%s', gitdir, action) fullpath = os.path.join(toplevel, gitdir.lstrip('/')) |