def __init__(self): self.conn_pool = Startup.get_connection_pool() self.server = None
# First call to startup. # Create MapRedis, MapMySql, MapMongo and MapCassandra objects # Create test payloads # Pass objects created above with payloads created above to MapActions and hopefully shit works # If it works and data is CRUDed as expected, then HURRAH!! else back to the drawing board. from startup import Startup from datasources import MapRedis, MapMySql, MapCassandra, MapMongo, MapActions # First call to startup. pool = Startup.get_connection_pool() # Create MapRedis, MapMySql, MapMongo and MapCassandra objects # mr = MapRedis.MapRedis(pool).server # ms = MapMySql.MapMySql(pool).server #mc = MapCassandra.MapCassandra(pool).server mm = MapMongo.MapMongo(pool).server # Create test payloads # prc = {'key': 'testkey', 'value': 'test value'} # prr = {'command': 'get', 'key': 'testkey'} # pru = {} # prd = {'command': 'del', 'key': 'testkey'} # psc = {'query': 'insert into test values(45, \'test text 3\');'} # psr = {'query': 'select * from test where test = 45;'} # psu = {'query': 'update test set value = \'new test text\' where test = 45;'} # psd = {'query': 'delete from test where test = 45;'} # pcc = { # 'query': 'insert into test(test, value) values(4, \'test text\');'} # pcr = {'query': 'select * from test;'} # pcu = {'query': 'update test set value = \'new test text\' where test = 4;'} # pcd = {'query': 'delete from test where test = 4;'}