Ejemplo n.º 1
0
	def __init__(self, prices):
		try:
			self.data = self.validate(prices)
		except DataEngineException as e:
			debug.error('%s'%e)
			self.data = {}
		except Exception as e:
			self.data = {}
Ejemplo n.º 2
0
 def __init__(self, prices):
     try:
         self.data = self.validate(prices)
     except DataEngineException as e:
         debug.error('%s' % e)
         self.data = {}
     except Exception as e:
         self.data = {}
Ejemplo n.º 3
0
def flush():
	

	# s = getSession()
	for table in [Application, Currencies, Good, Metrics, ABTest, Prices, Events]:
		try:
			# rows = s.query(table).count()
			rows = 0
			debug.log('Deleting table %s with %d rows'%(table.__name__, rows))
			table.__table__.drop(getEngine())
			# s.commit()
			# s.flush()
		except Exception as e:
			debug.error('%s'%e)
Ejemplo n.º 4
0
def flush():

    # s = getSession()
    for table in [
            Application, Currencies, Good, Metrics, ABTest, Prices, Events
    ]:
        try:
            # rows = s.query(table).count()
            rows = 0
            debug.log('Deleting table %s with %d rows' %
                      (table.__name__, rows))
            table.__table__.drop(getEngine())
            # s.commit()
            # s.flush()
        except Exception as e:
            debug.error('%s' % e)
Ejemplo n.º 5
0
	def validate(prices):
		debug.error('DataEngine function not implemented')
Ejemplo n.º 6
0
	def getPrices(self, progress):
		debug.error('DataEngine function not implemented')
Ejemplo n.º 7
0
 def validate(prices):
     debug.error('DataEngine function not implemented')
Ejemplo n.º 8
0
 def getPrices(self, progress):
     debug.error('DataEngine function not implemented')