@@ -67,19 +67,19 @@ If you want to run the task after `t` seconds of non-blocking delay, use `apply_
67
67
```
68
68
69
69
### ** Some important points on running Celery worker**
70
- - 1 . The following command determines the number of workers that can be forked/spawned:
70
+ 1 . The following command determines the number of workers that can be forked/spawned:
71
71
``` shell
72
72
ulimit -n
73
73
```
74
74
This number is actually the maximum number of
75
75
[ file descriptors] ( https://stackoverflow.com/questions/5256599/what-are-file-descriptors-explained-in-simple-terms )
76
76
that can be open at any point of time.
77
77
78
- - 2 . By running Celery's worker using ` celery -A ex_9_1 worker ` ,
78
+ 2 . By running Celery's worker using ` celery -A ex_9_1 worker ` ,
79
79
there are ` n ` number of processes forked/spawned by default, where ` n ` is the number of CPU cores.
80
80
You can determine this by running ` pgrep celery ` command (which returns their PIDs).
81
81
82
- - 3 . There are two important inputs for running celery worker, ` concurrency ` and ` autoscale ` :
82
+ 3 . There are two important inputs for running celery worker, ` concurrency ` and ` autoscale ` :
83
83
` concurrency ` is used to determine the number of processes to be forked/spawned by celery worker
84
84
(which has an upper-bound of maximum number of file descriptors under the hood).
85
85
` autoscale ` limits the number of forked/spawned processes between two numbers
@@ -94,13 +94,13 @@ It provides Cron-style scheduling and some interval based scheduling.
94
94
95
95
As the [ APScheduler official document] ( https://apscheduler.readthedocs.io/en/3.x/ ) states,
96
96
APScheduler has four compnents:
97
- - 1 . Trigger: Used to determine when to run the task and has three types:
97
+ 1 . Trigger: Used to determine when to run the task and has three types:
98
98
- a. Date
99
99
- b. Interval
100
100
- b. Cron
101
- - 2 . Job Store: Saves the scheduled jobs in memory or database.
102
- - 3 . Executor: Handles running of the jobs, using thread or process pool.
103
- - 4 . Scheduler: Binds all things together and helps with configuring the job stores and executors.
101
+ 2 . Job Store: Saves the scheduled jobs in memory or database.
102
+ 3 . Executor: Handles running of the jobs, using thread or process pool.
103
+ 4 . Scheduler: Binds all things together and helps with configuring the job stores and executors.
104
104
105
105
Now let's see an example of a simple periodic task using APScheduler from
106
106
[ Keshav Manglore] ( https://medium.com/@keshavmanglore/advanced-python-scheduler-scheduling-tasks-with-ap-scheduler-in-python-8c7998a4f116 )
0 commit comments