Renamed export factory

This commit is contained in:
Peter Yefi 2023-01-17 20:13:54 -05:00
parent 582c18ef0c
commit c462d75e08

View File

@ -12,13 +12,13 @@ import pickle
class Config:
def __init__(self):
self.factory = CityExportFactory(db_name='hub_prod', app_env='PROD',
dotenv_path="{}/.env".format(os.path.expanduser('~')))
self.export_db_factory = CityExportFactory(db_name='hub_prod', app_env='PROD',
dotenv_path="{}/.env".format(os.path.expanduser('~')))
self.import_db_factory = DBFactory(db_name='hub_prod', app_env='PROD',
dotenv_path="{}/.env".format(os.path.expanduser('~')))
def get_city(self, city_id):
city_obj = self.factory.get_city(city_id)
city_obj = self.export_db_factory.get_city(city_id)
city = pickle.loads(city_obj.city)
for building in city.buildings:
building.heated = True