mockslurm.process_db

Implements the access to a “slurm database”, stored in a HDF5 file.

HDF5 files are locked during access, which provides a convenient method to not have several process modifying the same database easily

Functions

append_job(db_file, **kwargs)

Append a job to the database

clear_db()

Deletes the database file.

find_db_file()

Return a path to the location of the mock database hdf5 file.

get_db(db_file)

Get the Database as a dataset in the HDF5 file

get_db_file_handle(db_file)

Open the database HDF5 file in append mode.

get_filtered_DB_mask(db_file, fields_values)

Get a mask selecting the DB rows where the field values are equal to fields_values values.

open_file_retry_on_locked(file[, mode, ...])

Open file as an HDF5 file in mode.

update_db_value(db_file, index, key, value)

Update the value of key in the database, at index

update_with_default_value(db_dict)

Update db_dict missing fields with the default value in the database

Classes

JobReason(value[, names, module, qualname, ...])

JobState(value[, names, module, qualname, ...])