scripts for starting / stopping scgi_server

"Al Pacifico" <[email protected]>
Newsgroups gmane.comp.web.quixote.user
Message-ID <004901c59c32$1f3a27d0$337ba8c0@Laptop8100>
I'm a newbie to Quixote.

Currently I'm stopping SCGI by running it in the foreground and using
ctrl-c, but eventually I will want a method I can use within a shell script.


I found some scripts for starting / stopping the SCGI server posted on the
web by Dave Kuhlman, but they looked like they predated Quixote-2.0. On
brief review, the QuixoteHandler class in the scgi module looks like what I
want, since it looks like it writes it's PID to a file, etc.

Here is my code (so far)...

	#!/usr/bin/python

	from quixote.server import scgi_server
	import quixote.config
	import quixote.publish
	import PMHx_Config

	import administrationDirectory

	config = PMHx_Config.Config()

	def create_my_publisher():
		return quixote.publish.Publisher(
			administrationDirectory.administrationDirectory(),
			config=quixote.config.Config(
				display_exceptions='plain',
	
access_log=config["QuixoteApplicationServer:access_log"],
	
error_log=config["QuixoteApplicationServer:error_log"])
			)

	scgi_server.run(create_my_publisher,
		port=int(config["QuixoteApplicationServer:port"]),
		script_name="/administration")

Replacing scgi_server.run with <a QuixoteHandler instance>.run doesn't look
like the right move based on reviewing Quixote_handler.py.

Could someone point me in the right directions?
Thanks.
-al

Al Pacifico
Seattle, WA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.