summaryrefslogtreecommitdiffstats
path: root/examples/glpi.py
diff options
context:
space:
mode:
authorUltrabug <ultrabug@gentoo.org>2013-04-16 10:22:58 +0200
committerUltrabug <ultrabug@gentoo.org>2013-04-16 10:22:58 +0200
commit7f73dcc512eeece1ea097de42732b46dba710eee (patch)
treee93964e5bc1e8b21d9133a7063323e7d09b4b037 /examples/glpi.py
parenteb2b4e9006629413df9eb5c64d40a923e44131f6 (diff)
glpi module dont need to be aggressive on timeout anymore, add POSITION parameter
Diffstat (limited to 'examples/glpi.py')
-rw-r--r--examples/glpi.py5
1 files 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)