Skip to content

Connection

pyslurm.db.Connection

A connection to the slurmdbd.

Attributes:

Name Type Description
is_open bool

Whether the connection is open or closed.

close() method descriptor

Close the current connection.

Examples:

>>> import pyslurm
>>> connection = pyslurm.db.Connection.open()
>>> ...
>>> connection.close()
>>> print(connection.is_open)
False

commit() method descriptor

Commit recent changes.

open() staticmethod

Open a new connection to the slurmdbd

Raises:

Type Description
RPCError

When opening the connection fails

Returns:

Type Description
pyslurm.db.Connection

Connection to slurmdbd

Examples:

>>> import pyslurm
>>> connection = pyslurm.db.Connection.open()
>>> print(connection.is_open)
True

rollback() method descriptor

Rollback recent changes.