Skip to content

Instantly share code, notes, and snippets.

@robspychala
robspychala / async_pymongo.py
Created July 18, 2011 02:47
eventlet is slower than sync pymongo queries?
# > time python async_pymongo.py
#
# real 0m0.511s
# user 0m0.220s
# sys 0m0.170s
import pymongo
import eventlet
eventlet.monkey_patch()
@robspychala
robspychala / redis_webhook
Created April 26, 2011 16:32
Simple example of a redis based webhook implementation. (gist has external dependancies, but they should be easy to remove)
#!/usr/bin/env python2.6
import sys, urllib2, urllib, time, threading, signal
sys.path.append('support/lib')
import settings
from settings import logging
from lib import taskqueue