diff --git a/gga_load_data.py b/gga_load_data.py index d6f944a4f6f7af3230a58cd30b832c1a05eca89d..52902a0c9c43b9848f1410367589911e6c1a0576 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 786afe8239a8b709e947b42f9c154839e87a2081..27645dc78642419f5674b97560f985b66a0fad78 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