芹菜 - 任务 ID 最大长度?

Celery - Task Id max length?

我想将芹菜任务 ID 存储在我的 Django 数据库的 CharField 模型中。我需要指定最大长度。 celery 任务 id 的最大长度是多少?

Celery 使用 Python 的标准库 uuid 模块(https://docs.python.org/3/library/uuid.html ) to generate task IDs. This module generates standard RFC-4122 UUID,这意味着 32 个十六进制数字,中间有 4 个破折号,因此 Python 生成了 UUID 字符串总是 36 个字符长(例如:6f726825-ccef-4be1-b64c-ae13605d48db)。