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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
f4390e8f
Commit
f4390e8f
authored
Jan 30, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Program that merely verifies a ZEO server is reachable.
parent
db22e4cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
src/scripts/zeoup.py
src/scripts/zeoup.py
+66
-0
No files found.
src/scripts/zeoup.py
0 → 100755
View file @
f4390e8f
#! /usr/bin/env python
"""Make sure a ZEO server is running.
Usage: zeoup.py [options]
Options:
-p port -- port to connect to
-h host -- host to connect to (default is current host)
-U path -- Unix-domain socket to connect to
You must specify either -p and -h or -U.
"""
from
ZEO.ClientStorage
import
ClientStorage
def
main
(
addr
,
storage
,
days
):
cs
=
ClientStorage
(
addr
,
storage
=
storage
,
wait_for_server_on_startup
=
1
)
# _startup() is an artifact of the way ZEO 1.0 works. The
# ClientStorage doesn't get fully initialized until registerDB()
# is called. The only thing we care about, though, is that
# registerDB() calls _startup().
cs
.
_startup
()
def
usage
(
exit
=
1
):
print
__doc__
print
" "
.
join
(
sys
.
argv
)
sys
.
exit
(
exit
)
if
__name__
==
"__main__"
:
import
getopt
import
socket
import
sys
host
=
None
port
=
None
unix
=
None
storage
=
'1'
days
=
0
try
:
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'p:h:U:S:d:'
)
for
o
,
a
in
opts
:
if
o
==
'-p'
:
port
=
int
(
a
)
elif
o
==
'-h'
:
host
=
a
elif
o
==
'-U'
:
unix
=
a
elif
o
==
'-S'
:
storage
=
a
except
Exception
,
err
:
print
err
usage
()
if
unix
is
not
None
:
addr
=
unix
else
:
if
host
is
None
:
host
=
socket
.
gethostname
()
if
port
is
None
:
usage
()
addr
=
host
,
port
main
(
addr
,
storage
,
days
)
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