accessmod/utils.py
def status_update(status: str, data: dict, url: str = None, token: str = None):
    """Update analysis status with webhook."""
    if not url or not token:
        return

    status = status.upper()
    if status not in (
        "DRAFT",
        "READY",
        "QUEUED",
        "RUNNING",
        "SUCCESS",
        "FAILED",
    ):
        raise ValueError(f"Analysis status {status} invalid.")
    data["status"] = status

    call_webhook(event_type="status_update", data=data, url=url, token=token)
Update analysis status with webhook.
Update analysis status with webhook.
Update analysis status with webhook .
def status_update(status: str, data: dict, url: str = None, token: str = None):
    if not url or not token:
        return
    status = status.upper()
    if status not in (
        "DRAFT",
        "READY",
        "QUEUED",
        "RUNNING",
        "SUCCESS",
        "FAILED",
    ):
        raise ValueError(f"Analysis status {status} invalid.")
    data["status"] = status
    call_webhook(event_type="status_update", data=data, url=url, token=token)
def status_update ( status : str , data : dict , url : str = None , token : str = None ) : if not url or not token : return status = status . upper ( ) if status not in ( "DRAFT" , "READY" , "QUEUED" , "RUNNING" , "SUCCESS" , "FAILED" , ) : raise ValueError ( f"Analysis status {status} invalid." ) data [ "status" ] = status call_webhook ( event_type = "status_update" , data = data , url = url , token = token )
Update analysis status with webhook.
Update analysis status with webhook .
"""Update analysis status with webhook."""
status
str
data
dict
url
str
token
str