Django Tasks backend combining in-process thread pool execution with database persistence
Project description
django-tasks-local-db
A Django Tasks backend that combines in-process thread pool execution with database persistence. Tasks run in your web process without a separate worker, while results are durably stored in the database.
This project is a remix of django-tasks-local and django-tasks-db. It takes the in-process executor approach from django-tasks-local and adds DB-backed result storage from django-tasks-db.
How it works
enqueue()writes a task row to the database, then submits it to an in-process thread pool- On completion, the DB row is updated with the result or error
- On restart, orphaned tasks are recovered from the database and resubmitted
Installation
pip install django-tasks-local-db
Configuration
INSTALLED_APPS = [
# ...
"django_tasks_local_db",
]
TASKS = {
"default": {
"BACKEND": "django_tasks_local_db.LocalDBBackend",
"OPTIONS": {
"MAX_WORKERS": 4,
},
}
}
Then run migrations:
python manage.py migrate django_tasks_local_db
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_tasks_local_db-0.2.0.tar.gz.
File metadata
- Download URL: django_tasks_local_db-0.2.0.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26ac6f19b2e04b2205b5ec2653ee87cf2390be70129601d85998ab37e4275eea
|
|
| MD5 |
421130cb27b59cac22e9eded0ae1cbd2
|
|
| BLAKE2b-256 |
8ef58a3a1681fb61738f40e5525cadb34c953358ed068f56e7e5259052d49490
|
Provenance
The following attestation bundles were made for django_tasks_local_db-0.2.0.tar.gz:
Publisher:
release.yml on fgregg/django-tasks-local-db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tasks_local_db-0.2.0.tar.gz -
Subject digest:
26ac6f19b2e04b2205b5ec2653ee87cf2390be70129601d85998ab37e4275eea - Sigstore transparency entry: 1097686975
- Sigstore integration time:
-
Permalink:
fgregg/django-tasks-local-db@bea8fb6967c455f5fcad3ff535c5e96b4b36b687 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/fgregg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bea8fb6967c455f5fcad3ff535c5e96b4b36b687 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_tasks_local_db-0.2.0-py3-none-any.whl.
File metadata
- Download URL: django_tasks_local_db-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57b5a36ca21c6d1f4c5650432d9471789a6ee0b29044d9510c465ba87fc50a68
|
|
| MD5 |
7140956d457af64dc7c1362ec14224a4
|
|
| BLAKE2b-256 |
04902145ed42f0a3f5771961fa481d4b012b56797e3a50142d0a9f95c6f27c69
|
Provenance
The following attestation bundles were made for django_tasks_local_db-0.2.0-py3-none-any.whl:
Publisher:
release.yml on fgregg/django-tasks-local-db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tasks_local_db-0.2.0-py3-none-any.whl -
Subject digest:
57b5a36ca21c6d1f4c5650432d9471789a6ee0b29044d9510c465ba87fc50a68 - Sigstore transparency entry: 1097687005
- Sigstore integration time:
-
Permalink:
fgregg/django-tasks-local-db@bea8fb6967c455f5fcad3ff535c5e96b4b36b687 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/fgregg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bea8fb6967c455f5fcad3ff535c5e96b4b36b687 -
Trigger Event:
release
-
Statement type: