Twisted application runner.

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 Register self._whenRunning with the reactor so that it is called once the reactor is running, then start the reactor.
Method whenRunning Call self._whenRunning with self._whenRunningArguments.
Method reactorExited Call self._reactorExited with self._reactorExitedArguments.
Class Variable _log The logger attached to this class. (type: Logger)
Instance Variable _reactor The reactor to start and run the application in. (type: IReactorCore)
Instance Variable _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)
Instance Variable _kill Whether this runner should kill an existing running instance of the application. (type: bool)
Instance Variable _defaultLogLevel The default log level to start the logging system with. (type: constantly.NamedConstant from LogLevel)
Instance Variable _logFile A file stream to write logging output to. (type: writable file-like object)
Instance Variable _fileLogObserverFactory A factory for the file log observer to use when starting the logging system.
Instance Variable _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)
Instance Variable _whenRunningArguments Keyword arguments to pass to whenRunning when it is called. (type: dict)
Instance Variable _reactorExited Hook to call after the reactor exits. (type: callable that takes the keyword arguments specified by reactorExitedArguments)
Instance Variable _reactorExitedArguments Keyword arguments to pass to reactorExited when it is called. (type: dict)
_log =
The logger attached to this class. (type: Logger)
_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)
def run(self): (source)

Run this command.

def killIfRequested(self): (source)

If self._kill is true, attempt to kill a running instance of the application.

def startLogging(self): (source)

Start the twisted.logger logging system.

def startReactor(self): (source)

Register self._whenRunning with the reactor so that it is called once the reactor is running, then start the reactor.

def whenRunning(self): (source)

Call self._whenRunning with self._whenRunningArguments.

NoteThis method is called after the reactor starts running.
def reactorExited(self): (source)

Call self._reactorExited with self._reactorExitedArguments.

NoteThis method is called after the reactor exits.
API Documentation for Twisted, generated by pydoctor at 2019-08-06 12:10:50.