Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Zope
Commits
559d3aa0
Commit
559d3aa0
authored
Jun 30, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge from 2.2 branch
parent
4efc46cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
z2.py
z2.py
+15
-9
No files found.
z2.py
View file @
559d3aa0
...
...
@@ -297,7 +297,7 @@ Zpid=''
# If you want run as a daemon, then uncomment the line below:
if
sys
.
platform
==
'win32'
:
Zpid
=
''
else
:
Zpid
=
'
var/
zProcessManager.pid'
else
:
Zpid
=
'zProcessManager.pid'
# This is the IP address of the network interface you want your servers to
# be visible from. This can be changed to '' to listen on all interfaces.
...
...
@@ -520,14 +520,21 @@ if LOCALE_ID is not None:
# Import ZServer before we open the database or get at interesting
# application code so that ZServer's asyncore gets to be the
# official one.
# official one.
Also gets SOFTWARE_HOME and INSTANCE_HOME
import
ZServer
# CLIENT_HOME allows ZEO clients to easily keep distinct pid and
# log files. This is currently an *experimental* feature, as I expect
# that increasing ZEO deployment will cause bigger changes to the
# way that z2.py works fairly soon.
try
:
CLIENT_HOME
=
os
.
environ
[
'CLIENT_HOME'
]
except
:
CLIENT_HOME
=
os
.
path
.
join
(
INSTANCE_HOME
,
'var'
)
if
Zpid
and
not
READ_ONLY
:
import
zdaemon
,
App
.
FindHomes
,
posix
sys
.
ZMANAGED
=
1
zdaemon
.
run
(
sys
.
argv
,
os
.
path
.
join
(
INSTANCE
_HOME
,
Zpid
))
zdaemon
.
run
(
sys
.
argv
,
os
.
path
.
join
(
CLIENT
_HOME
,
Zpid
))
# Import logging support
import
zLOG
...
...
@@ -540,24 +547,23 @@ else:
if
DETAILED_LOG_FILE
:
from
ZServer
import
DebugLogger
logfile
=
os
.
path
.
join
(
INSTANCE_HOME
,
'var'
,
DETAILED_LOG_FILE
)
logfile
=
os
.
path
.
join
(
CLIENT_HOME
,
DETAILED_LOG_FILE
)
DebugLogger
.
log
=
DebugLogger
.
DebugLogger
(
logfile
).
log
# Import Zope (or Main)
, and thus get SOFTWARE_HOME and INSTANCE_HOME
# Import Zope (or Main)
exec
"import "
+
MODULE
in
{}
# Location of the ZServer log file. This file logs all ZServer activity.
# You may wish to create different logs for different servers. See
# medusa/logger.py for more information.
if
not
os
.
path
.
isabs
(
LOG_FILE
):
LOG_PATH
=
os
.
path
.
join
(
INSTANCE_HOME
,
'var'
,
LOG_FILE
)
LOG_PATH
=
os
.
path
.
join
(
CLIENT_HOME
,
LOG_FILE
)
else
:
LOG_PATH
=
LOG_FILE
# Location of the ZServer pid file. When ZServer starts up it will write
# its PID to this file.
PID_FILE
=
os
.
path
.
join
(
INSTANCE_HOME
,
'var'
,
'Z2.pid'
)
PID_FILE
=
os
.
path
.
join
(
CLIENT_HOME
,
'Z2.pid'
)
# import ZServer stuff
...
...
@@ -604,7 +610,7 @@ if HTTP_PORT:
# Handler for a published module. zhttp_handler takes 3 arguments:
# The name of the module to publish, and optionally the URI base
# which is basically the SC
IR
PT_NAME, and optionally a dictionary
# which is basically the SC
RI
PT_NAME, and optionally a dictionary
# with CGI environment variables which override default
# settings. The URI base setting is useful when you want to
# publish more than one module with the same HTTP server. The CGI
...
...
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