def updateSandbox(conn, success, jobResults):
    if success:
        conn.execute("UPDATE cocreate_sandbox SET hostname = ?, ip_address = ? WHERE id = ?", (jobResults['fqdn'], jobResults['ip_address'], jobResults['job']['sandbox_id']))
    else:
        conn.execute("UPDATE cocreate_sandboxrequest SET request_status = ?, request_progress = ?, request_progress_msg = ? WHERE id = ?", ('err', jobResults['progress'], jobResults['err_message'], jobResults['job']['request_id']))
        conn.execute(
            "INSERT INTO cocreate_notification (added_at, read, msg, related_model_type, related_model_id, owner_id, progress, object_name, error) values (datetime('now'), 0, ?, 'srq', ?, ?, ?, ?, 1)",
            (jobResults['err_message'], jobResults['job']['request_id'], jobResults['job']['requested_by_id'], jobResults['progress'], jobResults['job']['sandbox_name'])
        )
    conn.commit()
Update the database with the results of the VM creation request.
dataset/ETHPy150Open ngageoint/cocreate/ccl-cookbook/files/default/cocreatelite/cocreate/worker.py/updateSandbox