From 7f73dcc512eeece1ea097de42732b46dba710eee Mon Sep 17 00:00:00 2001 From: Ultrabug Date: Tue, 16 Apr 2013 10:22:58 +0200 Subject: glpi module dont need to be aggressive on timeout anymore, add POSITION parameter --- examples/glpi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/glpi.py b/examples/glpi.py index 9d84f81..30e148e 100644 --- a/examples/glpi.py +++ b/examples/glpi.py @@ -19,6 +19,7 @@ class Py3status: MYSQL_HOST = '' MYSQL_PASSWD = '' MYSQL_USER = '' + POSITION = 0 try: # You need MySQL-python from http://pypi.python.org/pypi/MySQL-python @@ -29,7 +30,7 @@ class Py3status: user=MYSQL_USER, passwd=MYSQL_PASSWD, db=MYSQL_DB, - connect_timeout=1, # dont cause a lag on i3bar freshness + connect_timeout=5, ) mycr = mydb.cursor() mycr.execute('select count(*) from glpi_tickets where closedate is NULL and solvedate is NULL;') @@ -46,4 +47,4 @@ class Py3status: except Exception as e: pass finally: - return (0, response) + return (POSITION, response) -- cgit v1.3