Skip to content

Instantly share code, notes, and snippets.

@rohit-saharan
Created June 4, 2020 14:00
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 rohit-saharan/1f5398254f619271ae7c1f39834666d0 to your computer and use it in GitHub Desktop.
Save rohit-saharan/1f5398254f619271ae7c1f39834666d0 to your computer and use it in GitHub Desktop.
import tasks
from time import sleep
print("add 3+5")
ret = tasks.add.delay(3,5)
print("Task ID:")
print(ret)
sleep(10) #give SQS and your worker time enough to execute, so that you can check status on next line
print(ret.status) #this should say SUCCESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment