diff --git a/static/partials/view-repo.html b/static/partials/view-repo.html index 77a574b5a..2efe29be1 100644 --- a/static/partials/view-repo.html +++ b/static/partials/view-repo.html @@ -65,7 +65,7 @@
-
Your build is currently processing, if this takes longer than an hour, please contact quay support
+
Your build is currently processing, if this takes longer than an hour, please contact Quay.io support
diff --git a/workers/diffsworker.py b/workers/diffsworker.py index 62ea36d81..ce81b96f0 100644 --- a/workers/diffsworker.py +++ b/workers/diffsworker.py @@ -7,6 +7,7 @@ import argparse from apscheduler.scheduler import Scheduler from data.queue import image_diff_queue +from data.database import db as db_connection from endpoints.registry import process_image_changes @@ -37,6 +38,10 @@ def process_work_items(): logger.debug('No more work.') + if not db_connection.is_closed(): + logger.debug('Closing thread db connection.') + db_connection.close() + def start_worker(): logger.debug("Scheduling worker.") diff --git a/workers/dockerfilebuild.py b/workers/dockerfilebuild.py index e472e2116..4cdeb0e70 100644 --- a/workers/dockerfilebuild.py +++ b/workers/dockerfilebuild.py @@ -15,6 +15,7 @@ from requests.exceptions import ConnectionError from data.queue import dockerfile_build_queue from data.userfiles import UserRequestFiles from data import model +from data.database import db as db_connection from app import app @@ -201,6 +202,11 @@ def babysit_builder(request): logger.exception('Exception processing job: %s' % outer_ex.message) return False + finally: + if not db_connection.is_closed(): + logger.debug('Closing thread db connection.') + db_connection.close() + def process_work_items(pool): logger.debug('Getting work item from queue.') @@ -231,6 +237,10 @@ def process_work_items(pool): logger.debug('No more work.') + if not db_connection.is_closed(): + logger.debug('Closing thread db connection.') + db_connection.close() + def start_worker(): pool = ThreadPool(3)