twisted.application.runner._runner.Runner(object)
class documentationtwisted.application.runner._runner
View Source
(View In Hierarchy)
Twisted application runner.
Method | __init__ | |
Method | run | Run this command. |
Method | killIfRequested | If self.kill is true, attempt to kill a running instance of
the application. |
Method | startLogging | Start the twisted.logger
logging system. |
Method | startReactor | If self.reactor is None ,
install the default reactor and set self.reactor to the
default reactor. |
Method | whenRunning | Call self.whenRunning . |
Method | reactorExited | Call self.reactorExited . |
Parameters | reactor | The reactor to start and run the application in. (type: IReactorCore ) |
pidFile | The file to store the running process ID in. (type: callable that takes a single writable file-like object argument and returns
a twisted.logger.FileLogObserver ) | |
kill | Whether this runner should kill an existing running instance of the
application. (type: bool ) | |
defaultLogLevel | The default log level to start the logging system with. (type: constantly.NamedConstant
from LogLevel ) | |
logFile | A file stream to write logging output to. (type: writable file-like object) | |
fileLogObserverFactory | A factory for the file log observer to use when starting the logging system. | |
whenRunning | Hook to call after the reactor is running; this is where the application
code that relies on the reactor gets called. (type: callable that takes the keyword arguments specified by
whenRunningArguments ) | |
whenRunningArguments | Keyword arguments to pass to whenRunning when it is called. (type: dict ) | |
reactorExited | Hook to call after the reactor exits. (type: callable that takes the keyword arguments specified by
reactorExitedArguments ) | |
reactorExitedArguments | Keyword arguments to pass to reactorExited when it is called. (type: dict ) |
If self.kill
is true, attempt to kill a running instance of
the application.
If self.reactor
is None
,
install the default reactor and set self.reactor
to the
default reactor.
Register self.whenRunning
with the reactor so that it is
called once the reactor is running, then start the reactor.
Call self.whenRunning
.
Note | This method is called after the reactor starts running. |
Call self.reactorExited
.
Note | This method is called after the reactor exits. |