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. Equivalent to: |
Method | killIfRequested | No summary |
Method | writePIDFile | Write a PID file for this application if RunnerOptions.pidFilePath
is specified in self.options . |
Method | removePIDFile | Remove the PID file for this application if RunnerOptions.pidFilePath
is specified in self.options . |
Method | startLogging | Start the twisted.logger
logging system. |
Method | startReactor | No summary |
Method | whenRunning | If RunnerOptions.whenRunning
is specified in self.options , call it. |
Method | reactorExited | If RunnerOptions.reactorExited
is specified in self.options , call it. |
Parameters | options | Configuration options for this runner. (type: mapping of RunnerOptions
to values) |
Run this command. Equivalent to:
self.killIfRequested() self.writePIDFile() self.startLogging() self.startReactor() self.reactorExited() self.removePIDFile()
Additional steps may be added over time, but the order won't change.
Kill a running instance of this application if RunnerOptions.kill
is specified and True
in self.options
. This requires that RunnerOptions.pidFilePath
also be specified; exit with ExitStatus.EX_USAGE
if kill is requested with no PID file.
Write a PID file for this application if RunnerOptions.pidFilePath
is specified in self.options
.
Remove the PID file for this application if RunnerOptions.pidFilePath
is specified in self.options
.
Register self.whenRunning
with the reactor so that it is
called once the reactor is running and start the reactor. If RunnerOptions.reactor
is specified in self.options
, use that reactor; otherwise use
the default reactor.
If RunnerOptions.whenRunning
is specified in self.options
, call it.
Note | This method is called when the reactor is running. |
If RunnerOptions.reactorExited
is specified in self.options
, call it.
Note | This method is called after the reactor has exited. |