durusmail: quixote-users: scripts for starting / stopping scgi_server
scripts for starting / stopping scgi_server
2005-08-08
2005-08-08
mso@oz.net (2 parts)
scripts for starting / stopping scgi_server
Al Pacifico
2005-08-08
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 .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



reply