A django app to run a collection of tasks in a management command.
Project description
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.
Project details
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 dj-tasks-2.0.0.tar.gz.
File metadata
- Download URL: dj-tasks-2.0.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ef04de48776cdd600fb72f9e8da99c13d8ea6ba576025f07a5335bbf82f3a89
|
|
| MD5 |
2e83c02efcf24ee134c975664bc339a4
|
|
| BLAKE2b-256 |
cd0a7477365d733fa094a9a5862f53cb44c03824867d35df9649278c357323e9
|
File details
Details for the file dj_tasks-2.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: dj_tasks-2.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 2, Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b6e2dc2b737029a33a5b20a935e1b7a54af98615f14bb9b4e1af8e4bead0eb1
|
|
| MD5 |
35361804d364ceb327e64ec17b89faf9
|
|
| BLAKE2b-256 |
f05b217d32f77ae995428fa9c969258dc2444ca38c0223fe432468c4540cb4fe
|