Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos
Commits
b20ea3b3
Commit
b20ea3b3
authored
Jul 31, 2023
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/rapid-cdn: Launch server processes as daemons
parent
7a795346
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
software/rapid-cdn/test/test.py
software/rapid-cdn/test/test.py
+5
-5
No files found.
software/rapid-cdn/test/test.py
View file @
b20ea3b3
...
@@ -744,7 +744,7 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
...
@@ -744,7 +744,7 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
cls
.
backend_url
=
'http://%s:%s/'
%
server
.
server_address
cls
.
backend_url
=
'http://%s:%s/'
%
server
.
server_address
server_process
=
multiprocessing
.
Process
(
server_process
=
multiprocessing
.
Process
(
target
=
server
.
serve_forever
,
name
=
'HTTPServer'
)
target
=
server
.
serve_forever
,
name
=
'HTTPServer'
,
daemon
=
True
)
server_process
.
start
()
server_process
.
start
()
# from now on, socket is used by server subprocess, we can close it
# from now on, socket is used by server subprocess, we can close it
server
.
socket
.
close
()
server
.
socket
.
close
()
...
@@ -752,7 +752,7 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
...
@@ -752,7 +752,7 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
cls
.
backend_https_url
=
'https://%s:%s/'
%
server_https
.
server_address
cls
.
backend_https_url
=
'https://%s:%s/'
%
server_https
.
server_address
server_https_process
=
multiprocessing
.
Process
(
server_https_process
=
multiprocessing
.
Process
(
target
=
server_https
.
serve_forever
,
name
=
'HTTPSServer'
)
target
=
server_https
.
serve_forever
,
name
=
'HTTPSServer'
,
daemon
=
True
)
server_https_process
.
start
()
server_https_process
.
start
()
server_https
.
socket
.
close
()
server_https
.
socket
.
close
()
cls
.
logger
.
debug
(
'Started process %s'
%
(
server_https_process
,))
cls
.
logger
.
debug
(
'Started process %s'
%
(
server_https_process
,))
...
@@ -764,7 +764,7 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
...
@@ -764,7 +764,7 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
(
cls
.
_ipv4_address
,
cls
.
_server_netloc_a_http_port
),
(
cls
.
_ipv4_address
,
cls
.
_server_netloc_a_http_port
),
NetlocHandler
)
NetlocHandler
)
netloc_a_http_process
=
multiprocessing
.
Process
(
netloc_a_http_process
=
multiprocessing
.
Process
(
target
=
netloc_a_http
.
serve_forever
,
name
=
'netloc-a-http'
)
target
=
netloc_a_http
.
serve_forever
,
name
=
'netloc-a-http'
,
daemon
=
True
)
netloc_a_http_process
.
start
()
netloc_a_http_process
.
start
()
netloc_a_http
.
socket
.
close
()
netloc_a_http
.
socket
.
close
()
...
@@ -772,7 +772,7 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
...
@@ -772,7 +772,7 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
(
cls
.
_ipv4_address
,
cls
.
_server_netloc_b_http_port
),
(
cls
.
_ipv4_address
,
cls
.
_server_netloc_b_http_port
),
NetlocHandler
)
NetlocHandler
)
netloc_b_http_process
=
multiprocessing
.
Process
(
netloc_b_http_process
=
multiprocessing
.
Process
(
target
=
netloc_b_http
.
serve_forever
,
name
=
'netloc-b-http'
)
target
=
netloc_b_http
.
serve_forever
,
name
=
'netloc-b-http'
,
daemon
=
True
)
netloc_b_http_process
.
start
()
netloc_b_http_process
.
start
()
netloc_b_http
.
socket
.
close
()
netloc_b_http
.
socket
.
close
()
...
@@ -829,7 +829,7 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
...
@@ -829,7 +829,7 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
%
server_https_auth
.
server_address
%
server_https_auth
.
server_address
self
.
server_https_auth_process
=
multiprocessing
.
Process
(
self
.
server_https_auth_process
=
multiprocessing
.
Process
(
target
=
server_https_auth
.
serve_forever
,
name
=
'HTTPSServerAuth'
)
target
=
server_https_auth
.
serve_forever
,
name
=
'HTTPSServerAuth'
,
daemon
=
True
)
self
.
server_https_auth_process
.
start
()
self
.
server_https_auth_process
.
start
()
server_https_auth
.
socket
.
close
()
server_https_auth
.
socket
.
close
()
self
.
logger
.
debug
(
'Started process %s'
%
(
self
.
server_https_auth_process
,))
self
.
logger
.
debug
(
'Started process %s'
%
(
self
.
server_https_auth_process
,))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment