diff --git a/src/covid19/blueprints/owid_test/owid_test_service.py b/src/covid19/blueprints/owid_test/owid_test_service.py index 7233e05dc4bf92d467ef53060afc0e2f61ebe156..9640cb2c712deda87607b60798a8a9cbeebaaa2f 100644 --- a/src/covid19/blueprints/owid_test/owid_test_service.py +++ b/src/covid19/blueprints/owid_test/owid_test_service.py @@ -10,11 +10,12 @@ from covid19.blueprints.owid.owid_model import OwidDateReported, OwidContinent, class OwidTestService: - def __init__(self, database): + def __init__(self, database, owid_service): app.logger.debug("------------------------------------------------------------") app.logger.debug(" OwidTestService [init]") app.logger.debug("------------------------------------------------------------") self.__database = database + self.__owid_service = owid_service self.cfg = ApplicationServiceConfig.create_config_for_owid() app.logger.debug("------------------------------------------------------------") app.logger.info(" OwidTestService [ready]") @@ -43,7 +44,7 @@ class OwidTestService: app.logger.debug("------------------------------------------------------------") app.logger.debug(" OwidTestService.run_update_star_schema_incremental() [START]") app.logger.debug("------------------------------------------------------------") - app.logger.debug(" TODO....") + self.__owid_service.run_update_star_schema_incremental() app.logger.debug("------------------------------------------------------------") app.logger.debug(" OwidTestService.run_update_star_schema_incremental() [DONE]") app.logger.debug("------------------------------------------------------------") diff --git a/src/covid19/blueprints/owid_test/owid_test_views.py b/src/covid19/blueprints/owid_test/owid_test_views.py index 07c31f39ba751a43c75e08bea14d2e161d5ad2da..00837ed80fe8378ede9a14e1729c61cd60165533 100644 --- a/src/covid19/blueprints/owid_test/owid_test_views.py +++ b/src/covid19/blueprints/owid_test/owid_test_views.py @@ -14,7 +14,7 @@ from covid19.blueprints.application.application_model_transient import Applicati from covid19.blueprints.owid_test.owid_test_service import OwidTestService -owid_test_service = OwidTestService(db) +owid_test_service = OwidTestService(db, owid_service) app_owid_test = Blueprint('owid_test', __name__, template_folder='templates', url_prefix='/owid/test') diff --git a/src/covid19/blueprints/who_test/who_test_service.py b/src/covid19/blueprints/who_test/who_test_service.py index ac7b0e72c71c9c01345dfbe6bfd3558753d34b3d..26a1be175c6b29235316cf9fc59887aacd5c697e 100644 --- a/src/covid19/blueprints/who_test/who_test_service.py +++ b/src/covid19/blueprints/who_test/who_test_service.py @@ -5,11 +5,12 @@ from covid19.blueprints.application.application_service_config import Applicatio from covid19.blueprints.who.who_model import WhoDateReported, WhoData class WhoTestService: - def __init__(self, database): + def __init__(self, database, who_service): app.logger.debug("------------------------------------------------------------") app.logger.debug(" WHO Test Service [init]") app.logger.debug("------------------------------------------------------------") self.__database = database + self.__who_service = who_service self.cfg = ApplicationServiceConfig.create_config_for_who() app.logger.debug("------------------------------------------------------------") app.logger.info(" WHO Test Service [ready]") @@ -38,7 +39,7 @@ class WhoTestService: app.logger.debug("------------------------------------------------------------") app.logger.debug(" WhoTestService.run_update_star_schema_incremental() [START]") app.logger.debug("------------------------------------------------------------") - app.logger.debug("") + self.__who_service.run_update_star_schema_incremental() app.logger.debug("------------------------------------------------------------") app.logger.debug(" WhoTestService.run_update_star_schema_incremental() [DONE]") app.logger.debug("------------------------------------------------------------") diff --git a/src/covid19/blueprints/who_test/who_test_views.py b/src/covid19/blueprints/who_test/who_test_views.py index 48d487fc3df0f88863701cf0e5afeed568df68a8..5445165d693672773f5162795a3e69f17ce4b160 100644 --- a/src/covid19/blueprints/who_test/who_test_views.py +++ b/src/covid19/blueprints/who_test/who_test_views.py @@ -17,7 +17,7 @@ from covid19.blueprints.who.who_views import app_who from covid19.blueprints.who_test.who_test_service import WhoTestService -who_test_service = WhoTestService(db) +who_test_service = WhoTestService(db, who_service) app_who_test = Blueprint('who_test', __name__, template_folder='templates', url_prefix='/who/test')