gws.server.core

Configuration for embedded servers.

Source code: gws.server.core

Module Contents

class gws.server.core.Config(*args, **kwargs)

Bases: gws.Config

Server processes and logging.

autoRun: str = ''

Shell command to run before the server start. (deprecated in 8.2)

log: LogConfig | None

Logging configuration.

mapproxy: dict | None

Bundled MapProxy module, ignored. (deprecated in 8.5)

monitor: MonitorConfig | None

Monitor configuration.

postConfigure: str = ''

Shell or Python script to run after the server has been configured.

preConfigure: str = ''

Shell or Python script to run before configuring the server.

qgis: QgisConfig | None

QGIS server configuration.

spool: SpoolConfig | None

Spool server module configuration.

templates: list[gws.ext.config.template] | None

Templates for the nginx, uWSGI and syslog configs and the start script.

timeZone: str = 'Europe/Berlin'

Time zone of the server.

web: WebConfig | None

Web server module configuration.

withMapproxy: bool | None

Run the MapProxy server, ignored. (deprecated in 8.5)

withMonitor: bool = True

Run the monitor.

withSpool: bool = True

Run the spool server for background jobs.

withWeb: bool = True

Run the web server.

class gws.server.core.LogConfig(*args, **kwargs)

Bases: gws.Config

Logging configuration.

level: str = 'INFO'

Log level.

path: str = ''

Log path.

class gws.server.core.MonitorConfig(*args, **kwargs)

Bases: gws.Config

Monitor, which watches files and runs periodic tasks.

disableWatch: bool = False

Do not reconfigure the server when watched files change.

enabled: bool | None

The module is enabled. (deprecated in 8.2)

frequency: gws.Duration = '30'

Default interval of periodic tasks.

ignore: list[gws.Regex] | None

Ignore paths that match these regexes. (deprecated in 8.2)

class gws.server.core.QgisConfig(*args, **kwargs)

Bases: gws.Config

External QGIS server configuration.

host: str = 'qgis'

Host where the QGIS server runs.

port: int = 80

Port of the QGIS server.

class gws.server.core.SpoolConfig(*args, **kwargs)

Bases: gws.Config

Spool server, which runs background jobs.

enabled: bool | None

The module is enabled. (deprecated in 8.2)

jobFrequency: gws.Duration = '3'

Interval at which the spool server checks for new jobs.

timeout: gws.Duration = '300'

Max. run time of a background job before it is aborted.

workers: int = 4

Number of spool worker processes.

class gws.server.core.WebConfig(*args, **kwargs)

Bases: gws.Config

Web server, which handles client and API requests.

enabled: bool | None

The module is enabled. (deprecated in 8.2)

maxRequestLength: int = 10

Max. request body size in megabytes.

timeout: gws.Duration = '60'

Max. time to process a request before it is aborted.

workers: int = 4

Number of web worker processes.