A controllable timing task widgets with Celery.
Project description
celery-task-tigger
====
A controllable timing task widgets with Celery
## About
As is known to all, Celery have a already provides periodic task and it's very perfit. But, Assume this case: After my task was called, I hope it's task can frequency of execution, and when celery task was started.
The above case, Periodic task is hard to practice, Becacuse it's depend on celery beat. ``celery-task-tigger`` do it over simple packaging or implement for solution to do it.
## Installation
~~~python
pip install celery-task-tigger
~~~
## Useage
Assume you have aleady install celery and can do it.
### Bases
Option `max_times` is must be appoint.
~~~python
from celery_tasktigger.decorator import tigger_task
@app.task(bind=True)
@tigger_task(max_times='forever') # forever is expressed unlimited time
def add(self, x, y):
return x + y
~~~
### max_times
Option `max_times`: The maximum number of execute the task times.
Type: ***int***
> Note: The value ***'forever'*** is expressed unlimited time.
Example:
~~~python
@app.task(bind=True)
@tigger_task(max_times=3) # execute 3 times
def add(self, x, y):
return x + y
~~~
### countdown
Option `countdown`: You can also provide the countdown argument to execute.
Example:
~~~python
@app.task(bind=True)
@tigger_task(countdown=3) # execute in 3 seconds
def add(self, x, y):
return x + y
~~~
## How To Run
## More Example
## Features
- 100% full compatible with Celery
- the frequency of execution for task
- ...and many other stuff (o,0)
## Author
- Boyle Gu
====
A controllable timing task widgets with Celery
## About
As is known to all, Celery have a already provides periodic task and it's very perfit. But, Assume this case: After my task was called, I hope it's task can frequency of execution, and when celery task was started.
The above case, Periodic task is hard to practice, Becacuse it's depend on celery beat. ``celery-task-tigger`` do it over simple packaging or implement for solution to do it.
## Installation
~~~python
pip install celery-task-tigger
~~~
## Useage
Assume you have aleady install celery and can do it.
### Bases
Option `max_times` is must be appoint.
~~~python
from celery_tasktigger.decorator import tigger_task
@app.task(bind=True)
@tigger_task(max_times='forever') # forever is expressed unlimited time
def add(self, x, y):
return x + y
~~~
### max_times
Option `max_times`: The maximum number of execute the task times.
Type: ***int***
> Note: The value ***'forever'*** is expressed unlimited time.
Example:
~~~python
@app.task(bind=True)
@tigger_task(max_times=3) # execute 3 times
def add(self, x, y):
return x + y
~~~
### countdown
Option `countdown`: You can also provide the countdown argument to execute.
Example:
~~~python
@app.task(bind=True)
@tigger_task(countdown=3) # execute in 3 seconds
def add(self, x, y):
return x + y
~~~
## How To Run
## More Example
## Features
- 100% full compatible with Celery
- the frequency of execution for task
- ...and many other stuff (o,0)
## Author
- Boyle Gu
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
File details
Details for the file celery-task-tigger-0.2.tar.gz
.
File metadata
- Download URL: celery-task-tigger-0.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1bbba0bd272794178b29acb058125210bb28e6999bb28f155ad2ec8afb378da |
|
MD5 | a44e8105e1ad972348f4fa70260de495 |
|
BLAKE2b-256 | 10a3370929f814a2d4cf6eda35f3d7998b0694d2e07fce098a9340001083304a |