def updateProgress(request_id, percent_complete, message, url=None):
    """
    Update the progress of the sandbox request in the database.
    """
   
    cur = conn.execute("SELECT sandbox_id, sandbox_name, requested_by_id FROM cocreate_sandboxrequest WHERE id = ?", (request_id,))
    try:
        sandbox_id, sandbox_name, requested_by_id = cur.fetchone()
    except __HOLE__:
        raise LookupError('specified request not found')
    
    if percent_complete < 0 or percent_complete > 100:
        raise ValueError('percent_complete out of range')
    
    if len(message) > 100:
        raise ValueError('message too long')
    
    if percent_complete == 100:
        conn.execute("UPDATE cocreate_sandboxrequest SET request_status = ?, request_progress = ?, request_progress_msg = ? WHERE id = ?", ('avl', percent_complete, message, request_id))
    else:
        conn.execute("UPDATE cocreate_sandboxrequest SET request_progress = ?, request_progress_msg = ? WHERE id = ?", (percent_complete, message, 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', ?, ?, ?, ?, 0)",
        (message, request_id, requested_by_id, percent_complete, sandbox_name)
    )
    
    if url:
        conn.execute("UPDATE cocreate_sandbox SET url = ? WHERE id = ?", (url,sandbox_id ))

    conn.commit()
        
    return
dataset/ETHPy150Open ngageoint/cocreate/ccl-cookbook/files/default/cocreatelite/cocreate/worker.py/updateProgress