Created
February 12, 2012 14:10
-
-
Save longfin/1808724 to your computer and use it in GitHub Desktop.
after eventlet
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
import eventlet | |
eventlet.monkey_patch() #표준 라이브러리를 변환 | |
# 여러가지 import를 하고... | |
pool = eventlet.GreenPool() | |
# 페이스북 계정들을 가져와서 반복하면서 | |
for account in FacebookAccount.query: | |
# 코루틴들에게 떠넘기자. | |
pool.spawn_n(FacebookAccount.update, account) | |
pool.waitall() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment