diff options
| author | Ultrabug <ultrabug@gentoo.org> | 2013-04-16 10:22:58 +0200 |
|---|---|---|
| committer | Ultrabug <ultrabug@gentoo.org> | 2013-04-16 10:22:58 +0200 |
| commit | 7f73dcc512eeece1ea097de42732b46dba710eee (patch) | |
| tree | e93964e5bc1e8b21d9133a7063323e7d09b4b037 | |
| parent | eb2b4e9006629413df9eb5c64d40a923e44131f6 (diff) | |
glpi module dont need to be aggressive on timeout anymore, add POSITION parameter
| -rw-r--r-- | examples/glpi.py | 5 |
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) |
