swot_simulator.logbook.LogRecordSocketReceiver.start#

LogRecordSocketReceiver.start(num_processes: Optional[int] = 1, max_restarts: Optional[int] = None) None#

Starts this server in the .IOLoop.

By default, we run the server in this process and do not fork any additional child process.

If num_processes is None or <= 0, we detect the number of cores available on this machine and fork that number of child processes. If num_processes is given and > 1, we fork that specific number of sub-processes.

Since we use processes and not threads, there is no shared memory between any server code.

Note that multiple processes are not compatible with the autoreload module (or the autoreload=True option to tornado.web.Application which defaults to True when debug=True). When using multiple processes, no IOLoops can be created or referenced until after the call to TCPServer.start(n).

Values of num_processes other than 1 are not supported on Windows.

The max_restarts argument is passed to .fork_processes.

Changed in version 6.0: Added max_restarts argument.