Skip to main content

get_task_name

Use 'shadow' in request for the task name if applicable.

def get_task_name(
request: object,
default: string
) - > string

Use 'shadow' in request for the task name if applicable.

Parameters

NameTypeDescription
requestobjectThe request object containing potential task metadata in a 'shadow' attribute.
defaultstringThe fallback task name to return if the request does not specify a valid shadow name.

Returns

TypeDescription
stringThe task name extracted from the request's shadow attribute, or the provided default value if the shadow attribute is empty or missing.