def _workf(tick_id, session=None): ticks = yf.getTick(tick_id, session, length=date_len) ticks.sort() for _ in xrange(10): try: ticks.dumpToSQL() break except sqlite3.OperationalError, e: print e time.sleep(1)
def _workf(tick_id, host, session=None): ticks = yf.getTick(tick_id, session, length=date_len) ticks.sort() ticks.dumpToMongoDB()