You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/06/19 14:03:21 UTC

[airavata-django-portal] branch master updated: AIRAVATA-2638 Log getAPIVersion failures at debug level

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a39f76  AIRAVATA-2638 Log getAPIVersion failures at debug level
3a39f76 is described below

commit 3a39f76903f7ea65164768d5e68a4ff4b9b6e548
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Jun 19 09:57:56 2019 -0400

    AIRAVATA-2638 Log getAPIVersion failures at debug level
    
    Trying to cut down on getAPIVersion error emails
---
 django_airavata/settings.py | 4 ++--
 django_airavata/utils.py    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/django_airavata/settings.py b/django_airavata/settings.py
index 0eb6907..0aec9e2 100644
--- a/django_airavata/settings.py
+++ b/django_airavata/settings.py
@@ -251,7 +251,7 @@ AUTHENTICATION_OPTIONS = {
 # Seconds each connection in the pool is able to stay alive. If open connection
 # has lived longer than this period, it will be closed.
 # (https://github.com/Thriftpy/thrift_connector)
-THRIFT_CLIENT_POOL_KEEPALIVE = 10
+THRIFT_CLIENT_POOL_KEEPALIVE = 5
 
 # Webpack loader
 WEBPACK_LOADER = webpack_loader_util.create_webpack_loader_config()
@@ -290,7 +290,7 @@ LOGGING = {
             'level': 'DEBUG' if DEBUG else 'INFO'
         },
         'root': {
-            'handlers': ['console', 'mail_admins'],
+            'handlers': ['console'],
             'level': 'WARNING'
         }
     },
diff --git a/django_airavata/utils.py b/django_airavata/utils.py
index c44d2a2..dac60fe 100644
--- a/django_airavata/utils.py
+++ b/django_airavata/utils.py
@@ -203,8 +203,8 @@ class CustomThriftClient(connection_pool.ThriftClient):
     def ping(self):
         try:
             self.client.getAPIVersion()
-        except Exception:
-            log.exception("getAPIVersion failed")
+        except Exception as e:
+            log.debug("getAPIVersion failed: {}".format(str(e)))
             raise