Last active
January 10, 2019 00:15
-
-
Save artemrys/67157575bed678b6ac9e52f674e9f70e to your computer and use it in GitHub Desktop.
Simple celery application
This file contains 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 Celery | |
app = Celery( | |
"app", | |
broker="amqp://guest@localhost//", | |
backend="rpc", | |
) | |
@app.task | |
def add(x, y): | |
return x + y | |
if __name__ == '__main__': | |
app.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment