From 039be6e75859be1915126f55bc858ff314931034 Mon Sep 17 00:00:00 2001 From: Arthur Le Bars <arthur.le-bars@sb-roscoff.fr> Date: Tue, 23 Mar 2021 11:31:40 +0100 Subject: [PATCH] logging url when connecting --- gga_load_data.py | 3 ++- run_workflow_phaeoexplorer.py | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gga_load_data.py b/gga_load_data.py index d6f944a..52902a0 100644 --- a/gga_load_data.py +++ b/gga_load_data.py @@ -273,12 +273,13 @@ class LoadData(speciesData.SpeciesData): Exit if we cannot connect to the instance """ + + logging.info("Connecting to the galaxy instance (%s)" % self.instance_url) self.instance = galaxy.GalaxyInstance(url=self.instance_url, email=self.config["galaxy_default_admin_email"], password=self.config["galaxy_default_admin_password"] ) self.instance.histories.get_histories() - logging.info("Connecting to the galaxy instance...") try: self.instance.histories.get_histories() diff --git a/run_workflow_phaeoexplorer.py b/run_workflow_phaeoexplorer.py index 786afe8..27645dc 100644 --- a/run_workflow_phaeoexplorer.py +++ b/run_workflow_phaeoexplorer.py @@ -106,25 +106,28 @@ class RunWorkflow(speciesData.SpeciesData): return {"history_id": self.history_id, "library_id": library_id, "datasets": self.datasets} + def connect_to_instance(self): """ Test the connection to the galaxy instance for the current organism Exit if we cannot connect to the instance """ + + logging.info("Connecting to the galaxy instance (%s)" % self.instance_url) self.instance = galaxy.GalaxyInstance(url=self.instance_url, email=self.config["galaxy_default_admin_email"], password=self.config["galaxy_default_admin_password"] ) + self.instance.histories.get_histories() - logging.info("Connecting to the galaxy instance %s" % self.instance_url) try: self.instance.histories.get_histories() except bioblend.ConnectionError: - logging.critical("Cannot connect to galaxy instance %s" % self.instance_url) + logging.critical("Cannot connect to galaxy instance (%s) " % self.instance_url) sys.exit() else: - logging.info("Successfully connected to galaxy instance %s" % self.instance_url) + logging.info("Successfully connected to galaxy instance (%s) " % self.instance_url) return 1 -- GitLab