From: hyokeun Date: Mon, 12 Feb 2018 05:13:34 +0000 (+0900) Subject: DB connect timeout to 3 seconds X-Git-Tag: submit/trunk/20190927.012743~140 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92239efe147f35c4f8cc8cee808e977cf17c9d04;p=services%2Fjenkins-scripts.git DB connect timeout to 3 seconds Change-Id: I2dd5fb6683533397aea2d75aa2ef8e1509853a7f --- diff --git a/common/buildmonitor_db.py b/common/buildmonitor_db.py index b03022c..0e42a57 100644 --- a/common/buildmonitor_db.py +++ b/common/buildmonitor_db.py @@ -99,7 +99,7 @@ def connect_db(): print '%s %s %s' % (db_ip, db_user, db_name) # MySQL connect & get version - conn = MySQLdb.connect(db_ip, db_user, db_pass, db_name) + conn = MySQLdb.connect(db_ip, db_user, db_pass, db_name, connect_timeout=3) cursor = conn.cursor() query = "SELECT VERSION()" version = ''