diff --git a/portality/core.py b/portality/core.py index 3ec2ae469..13d3bae47 100644 --- a/portality/core.py +++ b/portality/core.py @@ -180,7 +180,7 @@ def create_es_connection(app): conn = elasticsearch.Elasticsearch(app.config['ELASTICSEARCH_HOSTS'], verify_certs=app.config.get("ELASTIC_SEARCH_VERIFY_CERTS", True), - request_timeout=app.config.get('ELASTICSEARCH_REQ_TIMEOUT', 15)) + timeout=app.config.get('ELASTICSEARCH_REQ_TIMEOUT', 15)) return conn diff --git a/portality/lib/es_snapshot.py b/portality/lib/es_snapshot.py index 1fda34d38..4649a9584 100644 --- a/portality/lib/es_snapshot.py +++ b/portality/lib/es_snapshot.py @@ -85,7 +85,7 @@ def list_snapshots(self): # If the client doesn't have the snapshots, ask ES for them if not self.snapshots: - resp = self.conn.snapshot.get(self.repo, '_all', master_timeout='600s') + resp = self.conn.snapshot.get(self.repo, '_all', master_timeout='600s', request_timeout=60) if 'snapshots' in resp: try: diff --git a/portality/lib/plugin.py b/portality/lib/plugin.py index 848ee95de..7d0ef42d0 100644 --- a/portality/lib/plugin.py +++ b/portality/lib/plugin.py @@ -60,9 +60,6 @@ def load_function(fnpath, cache_fn_ref=True): if fn is not None: return fn - if isinstance(fnpath, str): - print(type(fnpath)) - fn = load_function_raw(fnpath) if fn is None: app.logger.info("Could not load function {x}".format(x=fnpath)) diff --git a/portality/tasks/request_es_backup.py b/portality/tasks/request_es_backup.py index d26214583..c29191933 100644 --- a/portality/tasks/request_es_backup.py +++ b/portality/tasks/request_es_backup.py @@ -22,7 +22,7 @@ def run(self): resp, success = client.request_snapshot() if success: job = self.background_job - job.add_audit_message("ElasticSearch backup requested. Response: " + resp) + job.add_audit_message("ElasticSearch backup requested. Response: " + str(resp)) else: raise Exception("Exception {0} received from snapshots plugin.".format(resp))