You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by ea...@apache.org on 2020/06/22 21:20:04 UTC

[incubator-sdap-ingester] branch bug_fixes updated: gracefully exxit

This is an automated email from the ASF dual-hosted git repository.

eamonford pushed a commit to branch bug_fixes
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-ingester.git


The following commit(s) were added to refs/heads/bug_fixes by this push:
     new 36c1f4f  gracefully exxit
36c1f4f is described below

commit 36c1f4fd4e63e851789cdbb58c2236e0f8982838
Author: Eamon Ford <ea...@jpl.nasa.gov>
AuthorDate: Mon Jun 22 14:19:53 2020 -0700

    gracefully exxit
---
 collection_manager/collection_manager/main.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/collection_manager/collection_manager/main.py b/collection_manager/collection_manager/main.py
index a10446f..bc2d356 100644
--- a/collection_manager/collection_manager/main.py
+++ b/collection_manager/collection_manager/main.py
@@ -70,8 +70,12 @@ def main():
                                                granule_updated_callback=collection_processor.process_granule)
 
         collection_watcher.start_watching()
+
         while True:
-            time.sleep(1)
+            try:
+                time.sleep(1)
+            except KeyboardInterrupt:
+                return
 
     except Exception as e:
         logger.error(e)