1
1
# Django tasks Scheduler
2
2
3
- [ ![ Django CI] ( https://github.com/dsoftwareinc/django-tasks-scheduler/actions/workflows/test.yml/badge.svg )] ( https://github.com/dsoftwareinc/django-tasks-scheduler/actions/workflows/test.yml )
4
- ![ badge] ( https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/cunla/b756396efb895f0e34558c980f1ca0c7/raw/django-tasks-scheduler-4.json )
5
- [ ![ badge] ( https://img.shields.io/pypi/dm/django-tasks-scheduler )] ( https://pypi.org/project/django-tasks-scheduler/ )
6
- [ ![ Open Source Helpers] ( https://www.codetriage.com/dsoftwareinc/django-tasks-scheduler/badges/users.svg )] ( https://www.codetriage.com/dsoftwareinc/django-tasks-scheduler )
3
+ [ ![ Django CI] [ 1 ]] [ 2 ]
4
+ ![ badge] [ 3 ]
5
+ [ ![ badge] [ 4 ]] [ 5 ]
7
6
8
7
---
9
8
10
- A database backed async tasks scheduler for django.
9
+ A database backed asynchronous tasks scheduler for django.
11
10
This allows remembering scheduled tasks, their parameters, etc.
12
11
13
12
## Terminology
@@ -66,19 +65,19 @@ sequenceDiagram
66
65
end
67
66
box DB
68
67
participant db as Database
69
-
68
+
70
69
end
71
70
box Redis queue
72
71
participant queue as Queue
73
72
participant schedule as Queue scheduled tasks
74
- end
73
+ end
75
74
loop Scheduler process - loop forever
76
- note over scheduler,schedule: Database interaction
75
+ note over scheduler, schedule: Database interaction
77
76
scheduler ->> db: Check for enabled tasks that should be scheduled
78
77
critical There are tasks to be scheduled
79
78
scheduler ->> schedule: Create a job for task that should be scheduled
80
79
end
81
- note over scheduler,schedule: Redis queues interaction
80
+ note over scheduler, schedule: Redis queues interaction
82
81
scheduler ->> schedule: check whether there are scheduled tasks that should be executed
83
82
critical there are jobs that are scheduled to be executed
84
83
scheduler ->> schedule: remove jobs to be scheduled
@@ -100,10 +99,10 @@ sequenceDiagram
100
99
participant queue as Queue
101
100
participant finished as Queue finished jobs
102
101
participant failed as Queue failed jobs
103
- end
102
+ end
104
103
loop Worker process - loop forever
105
104
worker ->>+ queue: get the first job to be executed
106
- queue -->>- worker: A job to be executed or nothing
105
+ queue -->>- worker: A job to be executed or nothing
107
106
critical There is a job to be executed
108
107
worker ->> queue: Remove job from queue
109
108
worker ->> worker: Execute job
@@ -113,8 +112,8 @@ sequenceDiagram
113
112
worker ->> failed: Write job result
114
113
end
115
114
option No job to be executed
116
- worker ->> worker: sleep
117
- end
115
+ worker ->> worker: sleep
116
+ end
118
117
end
119
118
```
120
119
@@ -129,3 +128,9 @@ Please report issues via [GitHub Issues](https://github.com/dsoftwareinc/django-
129
128
## Acknowledgements
130
129
131
130
A lot of django-admin views and their tests were adopted from [ django-rq] ( https://github.com/rq/django-rq ) .
131
+
132
+ [ 1 ] :https://github.com/dsoftwareinc/django-tasks-scheduler/actions/workflows/test.yml/badge.svg
133
+ [ 2 ] :https://github.com/dsoftwareinc/django-tasks-scheduler/actions/workflows/test.yml
134
+ [ 3 ] :https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/cunla/b756396efb895f0e34558c980f1ca0c7/raw/django-tasks-scheduler-4.json
135
+ [ 4 ] :https://img.shields.io/pypi/dm/django-tasks-scheduler
136
+ [ 5 ] :https://pypi.org/project/django-tasks-scheduler/
0 commit comments