TornadoServer
TornadoServer create a web server and load services. It may work better with TornadoClient but as it accepts HTTPS you can create your own client
- class DIRAC.Core.Tornado.Server.TornadoServer.TornadoServer(services=None, port=None)
Bases:
object
Tornado webserver
Initialize and run an HTTPS Server for DIRAC services. By default it load all https services defined in the CS, but you can also give an explicit list.
The listening port is either:
Given as parameter
Loaded from the CS
/Systems/Tornado/<instance>/Port
Default to 8443
Example 1: Easy way to start tornado:
# Initialize server and load services serverToLaunch = TornadoServer() # Start listening when ready serverToLaunch.startTornado()
Example 2:We want to debug service1 and service2 only, and use another port for that
services = ['component/service1', 'component/service2'] serverToLaunch = TornadoServer(services=services, port=1234) serverToLaunch.startTornado()
- __init__(services=None, port=None)
- startTornado()
Starts the tornado server when ready. This method never returns.