"""
author: Zack Schwartz (zacharyhschwartz@gmail.com)
date created: 11/14/2011
"""

from generic_controller import *
import time
import pymongo

class FlowController(GenericController):
    def __init__(self, queue_control):
        GenericController.__init__(self, queue_control)

    def run(self):
        while True:
            for status in \
            self.db.raw_tweets.find().sort('$natural', pymongo.DESCENDING).limit(100):
                self.queue_control.queue_raw_tweets.put(status)

            time.sleep(5)

                
            








