Skip to content

Instantly share code, notes, and snippets.

@tonywangcn
Last active March 19, 2017 06:42
Show Gist options
  • Save tonywangcn/c29ad32fe957da7a1159dd4bad2c8bf3 to your computer and use it in GitHub Desktop.
Save tonywangcn/c29ad32fe957da7a1159dd4bad2c8bf3 to your computer and use it in GitHub Desktop.
run_tasks.py
from .tasks import longtime_add
import time
if __name__ == '__main__':
url = ['http://example1.com', 'http://example2.com', 'http://example3.com', 'http://example4.com'] # change them to your ur list.
for i in url:
result = longtime_add.delay(i)
print 'Task result:', result.result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment