# # <Location "^/qdemo/"> # SCGIServer 127.0.0.1 4000 # SCGIHandler On # </Location> from scgi.quixote_handler import QuixoteHandler, main from quixote import enable_ptl, Publisher class DemoPublisher(Publisher): def __init__(self, *args, **kwargs): Publisher.__init__(self, *args, **kwargs) # (Optional step) Read a configuration file self.read_config("demo.conf") # Open the configured log files self.setup_logs() class DemoHandler(QuixoteHandler): publisher_class = DemoPublisher root_namespace = "quixote.demo" prefix = "/qdemo" # Install the import hook that enables PTL modules. enable_ptl() main(DemoHandler)
#!/usr/bin/env python import os from quixote import enable_ptl from scgi.quixote_handler import QuixoteHandler, main enable_ptl() os.environ['GCJ_PROPERTIES'] = "disableLuceneLocks=true" from canary.qx_defs import CanaryPublisher class CanaryHandler (QuixoteHandler): publisher_class = CanaryPublisher root_namespace = "canary.ui" prefix = "" if __name__ == '__main__': enable_ptl() main(CanaryHandler)
#!/usr/bin/python from quixote.publish import Publisher from quixote.server.scgi_server import QuixoteHandler from scgi.quixote_handler import main from newaTools.program_interface import RootDirectory pname = 'newaTools' pnum = 4017 script_name = '/%s'%pname def create_publisher(): return Publisher(RootDirectory(), error_log="%s_err.log"%pname, access_log="%s_acc.log"%pname, display_exceptions="plain" ) def create_handler(parent_fd): return QuixoteHandler (parent_fd, create_publisher, script_name) if __name__ == '__main__': main(create_handler)
import sys sys.path[0] = '.' sys.path.insert(1, '/usr/local/share/tsvar') sys.path.insert(1, '/newa') from quixote.publish import Publisher from quixote.server.scgi_server import QuixoteHandler from scgi.quixote_handler import main from newaGraph.program_interface import RootDirectory pname = 'newaGraph' pnum = 4015 script_name = '/%s' % pname def create_publisher(): return Publisher(RootDirectory(), error_log="/logs/%s_err.log" % pname, access_log="/logs/%s_acc.log" % pname, display_exceptions="plain") def create_handler(parent_fd): return QuixoteHandler(parent_fd, create_publisher, script_name) if __name__ == '__main__': main(create_handler)
#!/usr/bin/env python import os from quixote import enable_ptl from scgi.quixote_handler import QuixoteHandler, main enable_ptl() os.environ['GCJ_PROPERTIES'] = "disableLuceneLocks=true" from canary.qx_defs import CanaryPublisher class CanaryHandler(QuixoteHandler): publisher_class = CanaryPublisher root_namespace = "canary.ui" prefix = "" if __name__ == '__main__': enable_ptl() main(CanaryHandler)