dj-tasks
A django app to run a collection of tasks in a management command.
Documentation
The full documentation is at https://dj-tasks.readthedocs.io.
Quickstart
Install dj-tasks:
pip install dj-tasks
Add it to your INSTALLED_APPS:
# project/settings.py
INSTALLED_APPS = [
...
'dj_tasks',
...
]
Create a task:
# your_app/tasks.py
from dj_tasks.tasks import Task
class YourTask(Task):
name = "Your Task"
frequency = 60
def run(self):
print("Your custom code...")
Add to your DJTASKS_TASKS settings:
# project/settings.py
DJTASKS_LOCK_ID = "your_django_project"
DJTASKS_TASKS = [
"your_app.tasks.YourTask",
]
Running Tests
Does the code actually work?
$ make install-dev $ make lint $ make test
Credits
Tools used in rendering this package:
History
2.0.0 (2022-09-25)
handle exception when running individual tasks
Drop support for django <3.2
Add support for django 4.0 and 4.1
1.1.0 (2020-12-28)
add documentation of DJTASKS_LOCK_ID to Quickstart
update MakeFile to use current work flow
close database connection after each full run
add dj_tasks.tasks.DeleteOldTaskRunTask
flake8 fixes
add twine for easier releases
move to GitHub Actions from Travis CI
drop testing with tox
1.0.0 (2020-07-01)
require setting DJTASKS_LOCK_ID
0.1.0 (2020-06-05)
First release on PyPI.
Metadata
Release files for dj-tasks 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dj-tasks-2.0.0.tar.gz | 9.5 kB | Without provenance | Details for dj-tasks-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dj_tasks-2.0.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for dj_tasks-2.0.0-py2.py3-none-any.whl |
Total release size: 17.8 kB
Release files / dj-tasks-2.0.0.tar.gz
| Download URL | dj-tasks-2.0.0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ef04de48776cdd600fb72f9e8da99c13d8ea6ba576025f07a5335bbf82f3a89
|
|
BLAKE2b-256 checksum How to use checksums |
cd0a7477365d733fa094a9a5862f53cb44c03824867d35df9649278c357323e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
|
Release files / dj_tasks-2.0.0-py2.py3-none-any.whl
| Download URL | dj_tasks-2.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5b6e2dc2b737029a33a5b20a935e1b7a54af98615f14bb9b4e1af8e4bead0eb1
|
|
BLAKE2b-256 checksum How to use checksums |
f05b217d32f77ae995428fa9c969258dc2444ca38c0223fe432468c4540cb4fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
|
Security for dj-tasks 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.