Opened 11 months ago

Closed 5 days ago

Last modified 4 days ago

#35859 closed New feature (fixed)

Add DEP14 Tasks interface

Reported by: Jake Howard Owned by: Jake Howard
Component: Tasks Version: dev
Severity: Normal Keywords:
Cc: Carlton Gibson, Harro, Evstifeev Roman, şuayip üzülmez Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As part of DEP 14, this ticket adds a generic Task interface, allowing enqueueing background tasks. Specifically:

  • Common API interface
  • Base backend
  • Task / result classes
  • Immediate / Dummy backends

These features already exist in django-tasks, but need to make their way into Django core.

The database backend is intentionally absent, but will be added in a future ticket. This makes the PR significantly smaller, and easier to review.

Change History (18)

comment:1 by Jake Howard, 11 months ago

Triage Stage: UnreviewedAccepted

comment:2 by Carlton Gibson, 11 months ago

Cc: Carlton Gibson added

Hey Jake, great.

You can’t accept your own ticket, but I’ll *pretend do that* now. ✅

comment:3 by Carlton Gibson, 11 months ago

We might need a new Tasks component for Trac. 😅

comment:4 by Harro, 11 months ago

Cc: Harro added

comment:5 by Claude Paroz, 11 months ago

Component: UncategorizedCore (Other)
Version: 5.0dev

comment:6 by Evstifeev Roman, 11 months ago

Cc: Evstifeev Roman added

comment:7 by şuayip üzülmez, 11 months ago

Cc: şuayip üzülmez added

comment:8 by Sarah Boyce, 8 months ago

Patch needs improvement: set

comment:9 by Jake Howard, 5 weeks ago

Patch needs improvement: unset

comment:10 by Sarah Boyce, 5 weeks ago

Patch needs improvement: set

comment:11 by Jake Howard, 2 weeks ago

Patch needs improvement: unset

comment:12 by Jacob Walls, 2 weeks ago

Triage Stage: AcceptedReady for checkin

comment:13 by Natalia Bidart, 10 days ago

Component: Core (Other)Tasks

comment:14 by Natalia Bidart, 6 days ago

Triage Stage: Ready for checkinAccepted

comment:15 by Natalia Bidart, 5 days ago

Triage Stage: AcceptedReady for checkin

comment:16 by nessita <124304+nessita@…>, 5 days ago

Resolution: fixed
Status: assignedclosed

In 4289966:

Fixed #35859 -- Added background Tasks framework interface.

This work implements what was defined in DEP 14
(https://github.com/django/deps/blob/main/accepted/0014-background-workers.rst).

Thanks to Raphael Gaschignard, Eric Holscher, Ran Benita, Sarah Boyce,
Jacob Walls, and Natalia Bidart for the reviews.

comment:17 by nessita <124304+nessita@…>, 4 days ago

In 9334499f:

Refs #35859 -- Included Task backends in system checks docs.

comment:18 by nessita <124304+nessita@…>, 4 days ago

In b931156:

Refs #35859 -- Removed support for Task enqueuing on transaction commit.

This removes the ability to configure Task enqueueing via a setting,
since the proposed ENQUEUE_ON_COMMIT did not support multi-database
setups.

Thanks to Simon Charette for the report.

Follow-up to 4289966d1b8e848e5e460b7c782dac009d746b20.

Note: See TracTickets for help on using tickets.
Back to Top