Skip to content
Snippets Groups Projects
Commit 9733f723 authored by David Trudgian's avatar David Trudgian
Browse files

daemonize httpd process

parent 6fec904d
No related merge requests found
......@@ -41,6 +41,7 @@ def cli(image, clair_uri, text_output, json_output, bind_ip, bind_port, quiet):
# Start an HTTP server to serve the .tar.gz from our temporary directory
# so that Clair can retrieve it
httpd = Process(target=http_server, args=(tar_dir, bind_ip, bind_port, quiet))
httpd.daemon = True
httpd.start()
# Allow up to 30 seconds for the httpd to start and be answering requests
httpd_ready = wait_net_service(bind_ip, bind_port, 30)
......
......@@ -46,6 +46,7 @@ def test_http_server(testimage, tmpdir):
"""Test we can retrieve the test image from in-built http server"""
httpd = multiprocessing.Process(target=http_server,
args=(os.path.dirname(testimage), '127.0.0.1', 8088, False))
httpd.daemon = True
httpd.start()
# Allow up to 30 seconds for the httpd to start and be answering requests
httpd_ready = wait_net_service('127.0.0.1', 8088, 30)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment