Skip to main content

prepare_queues

Converts a queue specification from a string, list, or None into a dictionary of queue names and their associated priorities.

def prepare_queues(
queues: Union[str, list, dict, None]
) - > dict

Normalizes various queue configuration formats into a standardized dictionary mapping queue names to their respective priorities.

Parameters

NameTypeDescription
queuesUnion[str, list, dict, None]The raw queue configuration which can be a comma-separated string, a list of colon-separated strings, or an existing dictionary.

Returns

TypeDescription
dictA dictionary where keys are queue names and values are their associated priority levels or metadata.