From 1bbcd91ae0fda0fb790c99320e9fb913e1c3f379 Mon Sep 17 00:00:00 2001 From: yackob03 Date: Tue, 29 Oct 2013 19:59:29 -0400 Subject: [PATCH] Make sure the daemon starts up in the right directory to access the certs file. --- buildserver/buildserver.py | 2 +- workers/dockerfilebuild.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/buildserver/buildserver.py b/buildserver/buildserver.py index ebd039cdc..1b159173b 100644 --- a/buildserver/buildserver.py +++ b/buildserver/buildserver.py @@ -209,4 +209,4 @@ def health_check(): if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT) - app.run(host='0.0.0.0', port=5002) + app.run(host='0.0.0.0', port=5002, threaded=True) diff --git a/workers/dockerfilebuild.py b/workers/dockerfilebuild.py index 7a3daa12f..e472e2116 100644 --- a/workers/dockerfilebuild.py +++ b/workers/dockerfilebuild.py @@ -5,6 +5,7 @@ import time import argparse import digitalocean import requests +import os from apscheduler.scheduler import Scheduler from multiprocessing.pool import ThreadPool @@ -257,7 +258,8 @@ if args.D: handler = logging.FileHandler(args.log) handler.setFormatter(formatter) root_logger.addHandler(handler) - with daemon.DaemonContext(files_preserve=[handler.stream]): + with daemon.DaemonContext(files_preserve=[handler.stream], + working_directory=os.getcwd()): start_worker() else: