Skip to content

Instantly share code, notes, and snippets.

@antunesleo
Last active February 14, 2020 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antunesleo/7b0b730bfa5e438894bca30375af6ec4 to your computer and use it in GitHub Desktop.
Save antunesleo/7b0b730bfa5e438894bca30375af6ec4 to your computer and use it in GitHub Desktop.
@app.task
def serve_a_coffee(_type, size):
"""
This is a celery task. Just a normal function with task decorator.
Note that we use the decorator from a celery insance.
"""
print('Serving a {} {} coffee!'.format(size, _type))
sleep(1)
print("""
---------------------------------
) (
( ) )
) ( (
mrf_______)_
.-'---------|
( C|/\/\/\/\/|
'-./\/\/\/\/|
'_________'
'-------'
---------------------------------
""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment