src/dirbs/metadata.py
def log_job_success(conn, job_command, run_id):
    """
    Log metadata indicating that the job specified by job_command and run_id finished successfully.

    Arguments:
        conn: dirbs db connection object
        job_command: job command name
        run_id: id of the current job executing this
    """
    # An auto-commit connection must be used to ensure the log is not rolled back due to any reason, it
    # must be preserved.
    assert conn.autocommit
    with conn.cursor() as cursor:
        cursor.execute("""UPDATE job_metadata
                             SET end_time = NOW(),
                                 status = 'success'
                           WHERE command = %s
                             AND run_id = %s""",
                       [job_command, run_id])
        assert cursor.rowcount == 1

    Log metadata indicating that the job specified by job_command and run_id finished successfully.

    Arguments:
        conn: dirbs db connection object
        job_command: job command name
        run_id: id of the current job executing this
    
Log metadata indicating that the job specified by job_command and run_id finished successfully.
Log metadata indicating that the job specified by job_command and run_id finished successfully .
def log_job_success(conn, job_command, run_id):
    assert conn.autocommit
    with conn.cursor() as cursor:
        cursor.execute("""UPDATE job_metadata
                             SET end_time = NOW(),
                                 status = 'success'
                           WHERE command = %s
                             AND run_id = %s""",
                       [job_command, run_id])
        assert cursor.rowcount == 1
def log_job_success ( conn , job_command , run_id ) : assert conn . autocommit with conn . cursor ( ) as cursor : cursor . execute ( """UPDATE job_metadata
                             SET end_time = NOW(),
                                 status = 'success'
                           WHERE command = %s
                             AND run_id = %s""" , [ job_command , run_id ] ) assert cursor . rowcount == 1
Log metadata indicating that the job specified by job_command and run_id finished successfully.
Log metadata indicating that the job specified by job_command and run_id finished successfully .
"""
    Log metadata indicating that the job specified by job_command and run_id finished successfully.

    Arguments:
        conn: dirbs db connection object
        job_command: job command name
        run_id: id of the current job executing this
    """ # An auto-commit connection must be used to ensure the log is not rolled back due to any reason, it # must be preserved.
conn
dirbs db connection object
dirbs db connection object
job_command
job command name
job command name
run_id
id of the current job executing this
id of the current job executing this