gws.server.manager

Server manager, which creates the server configuration files and the start script.

Source code: gws.server.manager

Module Contents

class gws.server.manager.Object

Bases: gws.ServerManager

Server manager.

configure()

Configuration hook.

Called when the node is initialized. Raising an exception here aborts the creation of the node.

configure_environment()

Overwrite the log level and the numbers of workers from the environment.

configure_templates()

Create the templates from the templates config and add the default templates.

create_server_configs(target_dir, script_path, pid_paths)

Create the server configuration files and the start script.

Parameters:
  • target_dir – Directory for the configuration files.

  • script_path – Path of the start script.

  • pid_paths – Paths of the pid files, keyed by server name (web, spool, nginx).

class gws.server.manager.TemplateArgs(*args, **kwargs)

Bases: gws.TemplateArgs

Arguments for configuration templates.

groupName: str

Group name of that user.

gwsEnv: dict

Environment variables whose names start with GWS_.

homeDir: str

Home directory of that user.

inContainer: bool

True if running in a container.

nginxConfig: str

nginx config path.

nginxPid: str

nginx pid path.

root: gws.Root

Root object.

serverDir: str

Absolute path to the gws/server directory.

spoolConfig: str

Spooler config path.

spoolPid: str

Spooler pid path.

spoolSocket: str

Spooler socket path.

syslogConfig: str

Syslog config path.

syslogPid: str

Syslog pid path.

userName: str

Name of the user the servers run as.

uwsgi: str

uWSGI backend name, web or spool, for the uWSGI config template.

webConfig: str

Web server config path.

webPid: str

Web server pid path.

webSocket: str

Web server socket path.