Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
694ff8e7
Commit
694ff8e7
authored
Jul 07, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better debugging of server startup.
parent
88c59631
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
src/ZEO/tests/forker.py
src/ZEO/tests/forker.py
+13
-2
No files found.
src/ZEO/tests/forker.py
View file @
694ff8e7
...
@@ -175,7 +175,7 @@ def stop_runner(thread, config, qin, qout, stop_timeout=9, pid=None):
...
@@ -175,7 +175,7 @@ def stop_runner(thread, config, qin, qout, stop_timeout=9, pid=None):
def
start_zeo_server
(
storage_conf
=
None
,
zeo_conf
=
None
,
port
=
None
,
keep
=
False
,
def
start_zeo_server
(
storage_conf
=
None
,
zeo_conf
=
None
,
port
=
None
,
keep
=
False
,
path
=
'Data.fs'
,
protocol
=
None
,
blob_dir
=
None
,
path
=
'Data.fs'
,
protocol
=
None
,
blob_dir
=
None
,
suicide
=
True
,
debug
=
False
,
suicide
=
True
,
debug
=
False
,
threaded
=
False
,
start_timeout
=
150
,
name
=
None
,
threaded
=
False
,
start_timeout
=
33
,
name
=
None
,
):
):
"""Start a ZEO server in a separate process.
"""Start a ZEO server in a separate process.
...
@@ -231,7 +231,15 @@ def start_zeo_server(storage_conf=None, zeo_conf=None, port=None, keep=False,
...
@@ -231,7 +231,15 @@ def start_zeo_server(storage_conf=None, zeo_conf=None, port=None, keep=False,
)
)
thread
.
daemon
=
True
thread
.
daemon
=
True
thread
.
start
()
thread
.
start
()
addr
=
qout
.
get
(
timeout
=
start_timeout
)
try
:
addr
=
qout
.
get
(
timeout
=
start_timeout
)
except
Exception
:
whine
(
"SERVER FAILED TO START"
)
if
thread
.
is_alive
():
whine
(
"Server thread/process is still running"
)
elif
not
threaded
:
whine
(
"Exit status"
,
thread
.
exitcode
)
raise
def
stop
(
stop_timeout
=
99
):
def
stop
(
stop_timeout
=
99
):
stop_runner
(
thread
,
tmpfile
,
qin
,
qout
,
stop_timeout
)
stop_runner
(
thread
,
tmpfile
,
qin
,
qout
,
stop_timeout
)
...
@@ -423,3 +431,6 @@ def debug_logging(logger='ZEO', stream='stderr', level=logging.DEBUG):
...
@@ -423,3 +431,6 @@ def debug_logging(logger='ZEO', stream='stderr', level=logging.DEBUG):
return
stop
return
stop
def
whine
(
*
message
):
print
(
*
message
,
file
=
sys
.
stderr
)
sys
.
stderr
.
flush
()
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