Skip to content

Commit d50a2fd

Browse files
committed
Document delete_old_jobs
1 parent 89689c7 commit d50a2fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ Jobs have a `state` field which can have one of the following values:
109109

110110
#### Management commands
111111

112+
There is a management command, `manage.py delete_old_jobs`, which deletes any
113+
jobs from the database which are in state `COMPLETE` or `FAILED` and were
114+
created more than 24 hours ago. This could be run, for example, as a cron task,
115+
to ensure the jobs table remains at a reasonable size.
116+
112117
For debugging/development purposes, a simple management command is supplied to create jobs:
113118

114119
manage.py create_job <job_name> --queue_name 'my_queue_name' --workspace '{"key": "value"}'

0 commit comments

Comments
 (0)