Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background workers #86

Merged
merged 54 commits into from
May 29, 2024
Merged
Changes from 50 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
3f937bc
Write a DEP for background workers
RealOrangeOne Feb 7, 2024
c5d836c
Move tasks from contrib to `django` root
RealOrangeOne Feb 9, 2024
96305e8
Provide default async implementations
RealOrangeOne Feb 9, 2024
c9c76d9
Explicitly mention the potential for future development
RealOrangeOne Feb 9, 2024
815ac49
Link out to example code
RealOrangeOne Feb 9, 2024
bc8170b
Add the ability to get an existing task
RealOrangeOne Feb 9, 2024
f0c6b3a
Fix typos
RealOrangeOne Feb 12, 2024
018af5c
Remove suggestion for how to implement cron-based scheduling
RealOrangeOne Feb 12, 2024
d9a10c7
Add thought process behind DatabaseBackend to DEP
RealOrangeOne Feb 12, 2024
28b5b84
Ensure a task keeps track of the parameters of the task when enqueued.
RealOrangeOne Feb 13, 2024
a21d00f
Add async stub for `get_task`
RealOrangeOne Feb 13, 2024
c24c2a3
Use a generic exception for tasks not existing
RealOrangeOne Feb 13, 2024
e6ebec7
Note that task functions must be globally importable
RealOrangeOne Feb 13, 2024
7b89e7b
Queueing an async task will not execute it immediately
RealOrangeOne Feb 13, 2024
fd679ed
Add a `DummyBackend`
RealOrangeOne Feb 13, 2024
4bb8f23
Correct number of built-in implementations
RealOrangeOne Feb 26, 2024
a58f0c2
Explicitly note that an exception is raised if a task doesn't exist
RealOrangeOne Feb 26, 2024
9fb9e34
Upper-case task statuses so it's clearer they're enum values
RealOrangeOne Feb 26, 2024
1663277
Fix typo
RealOrangeOne Feb 26, 2024
df9cf1f
Note that `result` may be None if the task hasn't completed
RealOrangeOne Feb 26, 2024
ffefb6c
Allow sync APIs to execute coroutines
RealOrangeOne Feb 26, 2024
961d7c7
Add a method for validating a task function
RealOrangeOne Feb 26, 2024
c289041
Don't allow different task statuses
RealOrangeOne Feb 26, 2024
70893bb
Explicitly allow async task functions
RealOrangeOne Feb 26, 2024
39bd0c3
Require task functions be marked
RealOrangeOne Feb 26, 2024
0ea2502
Be explicit that `when` should be timezone-aware
RealOrangeOne Mar 8, 2024
e9ffd7d
Note that the result will raise a value error if the task hasn't comp…
RealOrangeOne Mar 8, 2024
7efb22c
Remove the `raw` field
RealOrangeOne Mar 8, 2024
3da595f
Simplify exposed API and allow for more customisation
RealOrangeOne Mar 28, 2024
3bf55ab
Support multiple queues
RealOrangeOne Mar 28, 2024
dc53f2f
Timeouts and failed hooks are out of scope
RealOrangeOne Mar 28, 2024
3d6b866
The reference implementation will eventually be a backport
RealOrangeOne Mar 28, 2024
b973804
Arguments must be JSON serializable.
RealOrangeOne Mar 28, 2024
d33aa11
Tie a task to a backend
RealOrangeOne Mar 28, 2024
3261190
Better document task validation
RealOrangeOne Apr 2, 2024
1c3daef
Match `DATABASES` convention for settings
RealOrangeOne Apr 2, 2024
193a5c9
Assume the default backend when not defined
RealOrangeOne Apr 2, 2024
d07a9ab
Bump last modified date
RealOrangeOne Apr 2, 2024
310460e
Explicitly note swappable argument serialization is out of scope
RealOrangeOne Apr 4, 2024
be6fa49
Move primary enqueue APIs onto the task
RealOrangeOne Apr 5, 2024
cbe24fe
Allow passing a `timedelta` directly to `run_after`
RealOrangeOne Apr 19, 2024
95b3205
Avoid explicit count of included backends
RealOrangeOne Apr 19, 2024
7f314e8
Fix typo when defining example task backend
RealOrangeOne Apr 19, 2024
f05a5f8
Flesh out abstract
RealOrangeOne Apr 19, 2024
54b4515
Restore id to task result
RealOrangeOne Apr 19, 2024
74d2d7b
It's the result which is "got"
RealOrangeOne Apr 19, 2024
1c8d2f0
Rename task validation function
RealOrangeOne Apr 22, 2024
c165ffd
Give task result getter a more descriptive name
RealOrangeOne Apr 22, 2024
a141ba1
Expose the task's return value
RealOrangeOne Apr 22, 2024
2379123
Rename `TaskStatus` enum
RealOrangeOne Apr 26, 2024
46be8f3
Number DEP 14 Background Workers.
carltongibson May 13, 2024
cecaf44
Improve wording for the reference implementation
RealOrangeOne May 13, 2024
a8e08a9
Clarify backwards compatibility with phased support
RealOrangeOne May 13, 2024
d277b9d
Mark DEP 0014 as "Accepted"
RealOrangeOne May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading