Skip to main content

pod_db_utils

Utilities for the Pod results database.

Module

Functions

get_failed_files_cache

def get_failed_files_cache(    project_db_con: Connection, task_hash: str, datasource: FileSystemIterableSource,)> dict[str, dict[str, str]]:

Retrieves failed files information from the project database.

Arguments

  • project_db_con: The connection to the project database.
  • task_hash: The hash of the task.
  • datasource: The datasource to get column info from.

Returns Dictionary mapping filename to failure info (error_message, failure_timestamp, last_modified)

map_task_to_hash_add_to_db

def map_task_to_hash_add_to_db(    serialized_protocol: SerializedProtocol, task_hash: str, project_db_con: Connection,)> None:

Maps the task hash to the protocol and algorithm used.

Adds the task to the task database if it is not already present.

Arguments

  • serialized_protocol: The serialized protocol used for the task.
  • task_hash: The hash of the task.
  • project_db_con: The connection to the database.

save_failed_files_to_project_db

def save_failed_files_to_project_db(    project_db_con: Connection,    failed_files: dict[str, Exception],    task_hash: str,    datasource: FileSystemIterableSource,)> None:

Saves failed files information to the project database.

save_processed_datapoint_to_project_db

def save_processed_datapoint_to_project_db(    project_db_con: Connection, datasource: FileSystemIterableSource, task_hash: str,)> None:

Saves the result of a task run to the database.

Arguments

  • project_db_con: The connection to the project database.
  • datasource: The datasource used for the task.
  • task_hash: The hash of the task, a unique identifier for when results have come from the same task definition, regardless of whether they are from the same run.