Code of Conduct
Feature Description
I suggest defining exactly what the order of task execution should be.
Problem
The currently implemented first-party Tasks backends don't behave as proper queues for executing tasks. Therefore, there's no canonical definition for the order that tasks should be executed in based on their attributes.
django-tasks-db has defined this as:
[F("priority").desc(), F("run_after").asc(), F("enqueued_at").asc()]
(Defined as ORM fields for convenience).
Request or proposal
proposal
Additional Details
Some backends, such as RQ, do not support this level of customization for ordering. The standard should be best-effort, and adhered to as much as possible.
Implementation Suggestions
I suggest taking the semantics from django-tasks-db and defining them as the standard execution order.
Following on from https://code.djangoproject.com/ticket/37126, this could be additionally defined as a sorting implementation for TaskResult, rather than just in documentation.
Code of Conduct
Feature Description
I suggest defining exactly what the order of task execution should be.
Problem
The currently implemented first-party Tasks backends don't behave as proper queues for executing tasks. Therefore, there's no canonical definition for the order that tasks should be executed in based on their attributes.
django-tasks-dbhas defined this as:(Defined as ORM fields for convenience).
Request or proposal
proposal
Additional Details
Some backends, such as RQ, do not support this level of customization for ordering. The standard should be best-effort, and adhered to as much as possible.
Implementation Suggestions
I suggest taking the semantics from
django-tasks-dband defining them as the standard execution order.Following on from https://code.djangoproject.com/ticket/37126, this could be additionally defined as a sorting implementation for
TaskResult, rather than just in documentation.