schrodinger.job.server module

Interact with a Job Server.

schrodinger.job.server.ensure_localhost_server_running()

Makes sure there is a localhost jobserver running to do devtests. This server is configured in the default location.

NOTE: The function attempts to retry if SCHRODINGER_MAESTRO_RETRY_LOCAL_SERVER_START is set, and the exception is due to ‘address already in use’. This benefits squish testing environment where they have been seeing failure of this type. We will support this until we figure out through diagnostics added in the jobserver code.

schrodinger.job.server.jsc(schrodinger)
class schrodinger.job.server.ServerInfo(webServerSecret: str, hasLicenseChecking: bool, hasServerAuth: bool, hasSocketAuth: bool, authSocketPath: str, versionString: str, APIVersion: str, hostname: str, databaseType: str, schrodingerInstallation: str)

Bases: tuple

ServerInfo is a serialization of a jobs protobuf ServerInfoResponse. See “jobs.proto” for more up-to-date details on each of these fields.

It is created manually instead of generated by protoc because this is currently a niche data structure only used for generating a cert. It’s not worth the time to incorporate the generation into our build steps or to wrap from c++ using SWIG because the raw data must come serialized from jsc anyway - see “get_server_info” for details.

webServerSecret: str

Alias for field number 0

hasLicenseChecking: bool

Alias for field number 1

hasServerAuth: bool

Alias for field number 2

hasSocketAuth: bool

Alias for field number 3

authSocketPath: str

Alias for field number 4

versionString: str

Alias for field number 5

APIVersion: str

Alias for field number 6

hostname: str

Alias for field number 7

databaseType: str

Alias for field number 8

schrodingerInstallation: str

Alias for field number 9

classmethod from_dict(data: dict) schrodinger.job.server.ServerInfo

Convert a dict to a ServerInfo.

has_authenticator() bool
__contains__(key, /)

Return key in self.

__len__()

Return len(self).

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

schrodinger.job.server.get_server_info(schrodinger: str, address: str) schrodinger.job.server.ServerInfo

Subprocess ‘$SCHRODINGER/jsc server-info’ to get server information.

This must be collected from jsc (the Go gRPC JobServerClient cli) because the c++ gRPC client doesn’t support TLS connections to jobserver until we already have a cert.

schrodinger.job.server.decode_to_server_info(data: Union[str, bytes]) schrodinger.job.server.ServerInfo