|
[Webware-checkins] r6504 - in Webware/trunk: . WebKit
WebKit/Adapters WebKit/Adapters/CGIPlus WebKit/Docs
WebKit/Testing WebKit/Tests WebKit/Tests/Basic
From: <updates@we...> - 2007-04-25 12:45
|
Author: chrisz
Date: Wed Apr 25 06:45:26 2007
New Revision: 6504
Modified:
Webware/trunk/WebKit/ (props changed)
Webware/trunk/WebKit/.cvsignore
Webware/trunk/WebKit/Adapters/CGIAdapter.py
Webware/trunk/WebKit/Adapters/CGIPlus/CgiPlusAppServer.py
Webware/trunk/WebKit/Adapters/FCGIAdapter.py
Webware/trunk/WebKit/Adapters/HTTPAdapter.py
Webware/trunk/WebKit/Adapters/LRWPAdapter.py
Webware/trunk/WebKit/Adapters/ModPythonAdapter.py
Webware/trunk/WebKit/Adapters/ModSnakeAdapter.py
Webware/trunk/WebKit/AppServer.py
Webware/trunk/WebKit/Docs/Configuration.txt
Webware/trunk/WebKit/Docs/InstallGuide.txt
Webware/trunk/WebKit/Monitor.py
Webware/trunk/WebKit/Testing/stress.py
Webware/trunk/WebKit/Tests/ (props changed)
Webware/trunk/WebKit/Tests/.cvsignore
Webware/trunk/WebKit/Tests/Basic/ (props changed)
Webware/trunk/WebKit/ThreadedAppServer.py
Webware/trunk/clean.py
Log:
Standardized pid and address file names for more clarity:
webkit.pid -> unchanged
appserverpid.txt, monitorpid.txt -> appserver.pid, monitor.pid
address.text, monitor.text, http.text -> adapter.address, monitor.address, http.address
Modified: Webware/trunk/WebKit/.cvsignore
==============================================================================
--- Webware/trunk/WebKit/.cvsignore (original)
+++ Webware/trunk/WebKit/.cvsignore Wed Apr 25 06:45:26 2007
@@ -1,6 +1,5 @@
*.pyc
*.pyo
-address.text
-appserverpid.txt
-http.text
-profile.pstats
\ No newline at end of file
+*.pid
+*.address
+*.pstats
\ No newline at end of file
Modified: Webware/trunk/WebKit/Adapters/CGIAdapter.py
==============================================================================
--- Webware/trunk/WebKit/Adapters/CGIAdapter.py (original)
+++ Webware/trunk/WebKit/Adapters/CGIAdapter.py Wed Apr 25 06:45:26 2007
@@ -8,7 +8,7 @@
package, and then sends it to the WebKit application server over TCP/IP.
This script expects to find a file in its directory called
-'address.text' that specifies the address of the app server.
+'adapter.address' that specifies the address of the app server.
The file is written by the app server upon successful startup
and contains nothing but:
@@ -54,7 +54,7 @@
#open('counter.text', 'w').write(str(counter))
#open('rr-%02d.rr' % counter, 'w').write(str(dict))
- host, port = open(os.path.join(self._webKitDir, 'address.text')).read().split(':', 1)
+ host, port = open(os.path.join(self._webKitDir, 'adapter.address')).read().split(':', 1)
if os.name == 'nt' and host == '': # MS Windows doesn't like a blank host name
host = 'localhost'
port = int(port)
Modified: Webware/trunk/WebKit/Adapters/CGIPlus/CgiPlusAppServer.py
==============================================================================
--- Webware/trunk/WebKit/Adapters/CGIPlus/CgiPlusAppServer.py (original)
+++ Webware/trunk/WebKit/Adapters/CGIPlus/CgiPlusAppServer.py Wed Apr 25 06:45:26 2007
@@ -13,7 +13,7 @@
stop: stop the currently running Apperver
ClassName.SettingName=value: change configuration settings
-When started, the app server records its pid in appserverpid.txt.
+When started, the app server records its pid in appserver.pid.
"""
Modified: Webware/trunk/WebKit/Adapters/FCGIAdapter.py
==============================================================================
--- Webware/trunk/WebKit/Adapters/FCGIAdapter.py (original)
+++ Webware/trunk/WebKit/Adapters/FCGIAdapter.py Wed Apr 25 06:45:26 2007
@@ -66,7 +66,7 @@
* 2000-05-08 ce:
* Fixed bug in exception handler to send first message to stderr, instead of stdout
- * Uncommented the line for reading 'address.text'
+ * Uncommented the line for reading 'adapter.address'
* Switched from eval() encoding to marshal.dumps() encoding in accordance with AppServer
* Increased rec buffer size from 8KB to 32KB
* Removed use of pr() for feeding app server results back to webserver. Figure that's slightly more efficient.
@@ -172,7 +172,7 @@
webKitDir = os.path.join(webwareDir, 'WebKit')
os.chdir(webKitDir)
-host, port = open(os.path.join(webKitDir, 'address.text')).read().split(':', 1)
+host, port = open(os.path.join(webKitDir, 'adapter.address')).read().split(':', 1)
port = int(port)
fcgiloop = FCGIAdapter(webKitDir)
Modified: Webware/trunk/WebKit/Adapters/HTTPAdapter.py
==============================================================================
--- Webware/trunk/WebKit/Adapters/HTTPAdapter.py (original)
+++ Webware/trunk/WebKit/Adapters/HTTPAdapter.py Wed Apr 25 06:45:26 2007
@@ -25,7 +25,7 @@
else:
sys.path.insert(0, workDir)
from WebKit.Adapters.Adapter import Adapter
- host, port = open(os.path.join(webKitDir, 'address.text')).read().split(':')
+ host, port = open(os.path.join(webKitDir, 'adapter.address')).read().split(':')
if os.name == 'nt' and host == '':
# MS Windows doesn't like a blank host name
host = 'localhost'
Modified: Webware/trunk/WebKit/Adapters/LRWPAdapter.py
==============================================================================
--- Webware/trunk/WebKit/Adapters/LRWPAdapter.py (original)
+++ Webware/trunk/WebKit/Adapters/LRWPAdapter.py Wed Apr 25 06:45:26 2007
@@ -43,7 +43,7 @@
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
# Get Host and Port information for WebKit AppServer
- (self.host, self.port) = open(os.path.join(self._webKitDir, 'address.text')).read().split(':')
+ (self.host, self.port) = open(os.path.join(self._webKitDir, 'adapter.address')).read().split(':')
self.port = int(self.port)
def lrwpConnect(self, LRWPappName, LRWPhost, LRWPport):
Modified: Webware/trunk/WebKit/Adapters/ModPythonAdapter.py
==============================================================================
--- Webware/trunk/WebKit/Adapters/ModPythonAdapter.py (original)
+++ Webware/trunk/WebKit/Adapters/ModPythonAdapter.py Wed Apr 25 06:45:26 2007
@@ -14,7 +14,7 @@
SetHandler python-program
# add the directory that contains ModPythonAdapter.py
PythonPath "sys.path+['/path/to/WebKit']"
- PythonOption AppWorkDir /path/to/dir/with/address.text
+ PythonOption AppWorkDir /path/to/dir/with/adapter.address
PythonHandler WebKit.Adapters.ModPythonAdapter
PythonDebug On
</Location>
@@ -22,7 +22,7 @@
If you used the MakeAppWorkDir.py script to make a seperate
application working directory, specify that path for the AppWorkDir
option, otherwise it should be in your WebKit directory in which case
-you should use /path/to/WebKit/address.text
+you should use /path/to/WebKit/adapter.address
http://localhost/WK/Welcome
@@ -33,7 +33,7 @@
AddHandler python-program .psp
PythonPath "sys.path+['/path/to/WebKit']"
PythonHandler modpHandler::pspHandler
-PythonOption AppWorkDir /path/to/dir/with/address.text
+PythonOption AppWorkDir /path/to/dir/with/adapter.address
"""
# Fix the current working directory -- this gets initialized incorrectly
@@ -271,8 +271,8 @@
global __adapter
if __adapter is None:
appWorkDir = req.get_options()['AppWorkDir']
- WEBWARE_ADDRESS_FILE = os.path.join(appWorkDir, 'address.text')
- (host, port) = open(WEBWARE_ADDRESS_FILE).read().split(':')
+ WEBWARE_ADDRESS_FILE = os.path.join(appWorkDir, 'adapter.address')
+ host, port = open(WEBWARE_ADDRESS_FILE).read().split(':')
port = int(port)
__adapter = ModPythonAdapter(host, port, appWorkDir)
return __adapter
Modified: Webware/trunk/WebKit/Adapters/ModSnakeAdapter.py
==============================================================================
--- Webware/trunk/WebKit/Adapters/ModSnakeAdapter.py (original)
+++ Webware/trunk/WebKit/Adapters/ModSnakeAdapter.py Wed Apr 25 06:45:26 2007
@@ -9,7 +9,7 @@
SnakeModuleDir /path/to/Webware
SnakeModuleDir /path/to/Webware/WebKit
SnakeModule ModSnakeAdapter.ModSnakeAdapter
-WebwareAddress /path/to/Webware/WebKit/address.text
+WebwareAddress /path/to/Webware/WebKit/adapter.address
AddHandler webware .psp
<Location /wpy>
Modified: Webware/trunk/WebKit/AppServer.py
==============================================================================
--- Webware/trunk/WebKit/AppServer.py (original)
+++ Webware/trunk/WebKit/AppServer.py Wed Apr 25 06:45:26 2007
@@ -39,7 +39,7 @@
'PlugIns': [],
'PlugInDirs': [],
'CheckInterval': 100,
- 'PidFile': 'appserverpid.txt',
+ 'PidFile': 'appserver.pid',
}
# This actually gets set inside AppServer.__init__
@@ -452,10 +452,10 @@
print "Stopping the AppServer..."
if kw.has_key('workDir'):
# app directory
- pidfile = os.path.join(kw['workDir'], "appserverpid.txt")
+ pidfile = os.path.join(kw['workDir'], "appserver.pid")
else:
# pidfile is in WebKit directory
- pidfile = os.path.join(os.path.dirname(__file__), "appserverpid.txt")
+ pidfile = os.path.join(os.path.dirname(__file__), "appserver.pid")
try:
pid = int(open(pidfile).read())
except Exception:
Modified: Webware/trunk/WebKit/Docs/Configuration.txt
==============================================================================
--- Webware/trunk/WebKit/Docs/Configuration.txt (original)
+++ Webware/trunk/WebKit/Docs/Configuration.txt Wed Apr 25 06:45:26 2007
@@ -403,7 +403,7 @@
When the AppServer starts up, the process ID will be written into this file.
The path will be relative to the working directory (or WebKit path, if
you're not using a working directory), or you can specify an absolute path.
- Default: ``WORKDIR/appserverpid.txt``.
+ Default: ``WORKDIR/appserver.pid``.
``PluginDirs``:
When the application server starts up, it looks in these locations for
plugins. Each plugin is a subdirectory of its own. By default WebKit looks
Modified: Webware/trunk/WebKit/Docs/InstallGuide.txt
==============================================================================
--- Webware/trunk/WebKit/Docs/InstallGuide.txt (original)
+++ Webware/trunk/WebKit/Docs/InstallGuide.txt Wed Apr 25 06:45:26 2007
@@ -1030,7 +1030,7 @@
want to use the standard system locations for the files instead.
Note that the application server maintains its own pid file, usually called
-``appserverpid.txt``. You should use a different pid file for the start script,
+``appserver.pid``. You should use a different pid file for the start script,
although it actually records the same pid, i.e. the pid of Webware's Python
application server, not the pid of the wrapper script ``AppServer`` which is
responsible for the AutoReload mechanism.
Modified: Webware/trunk/WebKit/Monitor.py
==============================================================================
--- Webware/trunk/WebKit/Monitor.py (original)
+++ Webware/trunk/WebKit/Monitor.py Wed Apr 25 06:45:26 2007
@@ -166,7 +166,7 @@
global running
running = 1
- file = open("monitorpid.txt", "w")
+ file = open("monitor.pid", "w")
if os.name == 'posix':
file.write(str(os.getpid()))
file.flush()
@@ -245,10 +245,10 @@
"""Stop the monitor.
This kills the other monitor process that has been opened
- (from the PID file ``monitorpid.txt``).
+ (from the PID file ``monitor.pid``).
"""
- pid = int(open("monitorpid.txt", "r").read())
+ pid = int(open("monitor.pid", "r").read())
# this goes to the other running instance of this module
os.kill(pid, signal.SIGINT)
Modified: Webware/trunk/WebKit/Testing/stress.py
==============================================================================
--- Webware/trunk/WebKit/Testing/stress.py (original)
+++ Webware/trunk/WebKit/Testing/stress.py Wed Apr 25 06:45:26 2007
@@ -112,7 +112,7 @@
"""Execute stress test on the AppServer according to the arguments."""
# taken from CGIAdapter:
try:
- host, port = open('../address.text').read().split(':')
+ host, port = open('../adapter.address').read().split(':')
except:
print "Please start the application server first."
return
Modified: Webware/trunk/WebKit/Tests/.cvsignore
==============================================================================
--- Webware/trunk/WebKit/Tests/.cvsignore (original)
+++ Webware/trunk/WebKit/Tests/.cvsignore Wed Apr 25 06:45:26 2007
@@ -1,4 +1,5 @@
*.pyc
*.pyo
-address.text
-http.text
\ No newline at end of file
+*.pid
+*.address
+*.pstats
\ No newline at end of file
Modified: Webware/trunk/WebKit/ThreadedAppServer.py
==============================================================================
--- Webware/trunk/WebKit/ThreadedAppServer.py (original)
+++ Webware/trunk/WebKit/ThreadedAppServer.py Wed Apr 25 06:45:26 2007
@@ -18,7 +18,7 @@
daemon: run as a daemon
ClassName.SettingName=value: change configuration settings
-When started, the app server records its pid in appserverpid.txt.
+When started, the app server records its pid in appserver.pid.
"""
@@ -568,7 +568,7 @@
def addressFileName(self, handlerClass):
"""Get the name of the text file with the server address."""
- return '%s.text' % handlerClass.protocolName
+ return '%s.address' % handlerClass.protocolName
class Handler:
@@ -791,7 +791,7 @@
to handle that data.
"""
- protocolName = 'address'
+ protocolName = 'adapter'
settingPrefix = 'Adapter'
def handleRequest(self):
Modified: Webware/trunk/clean.py
==============================================================================
--- Webware/trunk/clean.py (original)
+++ Webware/trunk/clean.py Wed Apr 25 06:45:26 2007
@@ -18,11 +18,8 @@
CGIWrapper/Errors.csv
CGIWrapper/Scripts.csv
CGIWrapper/ErrorMsgs/*.html
-WebKit/appserverpid.txt
-WebKit/monitorpid.txt
-WebKit/address.text
-WebKit/http.text
-WebKit/monitor.text
+WebKit/*.pid
+WebKit/*.address
WebKit/Logs/*.csv
WebKit/ErrorMsgs/*.html
'''
|
| Thread | Author | Date |
|---|---|---|
| [Webware-checkins] r6504 - in Webware/trunk: . WebKit WebKit/Adapters WebKit/Adapters/CGIPlus WebKit/Docs WebKit/Testing WebKit/Tests WebKit/Tests/Basic | <updates@we...> |