Add source example files
This commit is contained in:
9
source/taskqueues/celeryapp.py
Normal file
9
source/taskqueues/celeryapp.py
Normal file
@ -0,0 +1,9 @@
|
||||
from celery import Celery
|
||||
|
||||
application = Celery("demo", backend="redis://localhost:6379/0", broker='redis://localhost//')
|
||||
|
||||
|
||||
@application.task
|
||||
def show_text():
|
||||
print("Hello")
|
||||
return "Hello"
|
4
source/taskqueues/taskrunner.py
Normal file
4
source/taskqueues/taskrunner.py
Normal file
@ -0,0 +1,4 @@
|
||||
from celeryapp import show_text
|
||||
|
||||
|
||||
show_text.delay()
|
Reference in New Issue
Block a user