Created
May 14, 2021 14:48
-
-
Save syedjafer/915ff403744525fc3176d3d6436eedfa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from celery import signature | |
from celery import Celery | |
import json | |
app = Celery(name="tasks", | |
broker="redis://localhost:6379/0", | |
backend="db+sqlite:///db+sqlite3" | |
) | |
@app.task | |
def sum_2_num(param1, param2): | |
return param2+param1 | |
task_sum = signature( | |
'signature.sum_2_num', | |
args=(2, 34), | |
queue='sum_queue' | |
) | |
print(task_sum) | |
print(json.dumps(task_sum, indent=4)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment