summaryrefslogtreecommitdiffstats
path: root/py3status/__init__.py
diff options
context:
space:
mode:
authorUltrabug <ultrabug@gentoo.org>2015-02-10 19:48:00 +0100
committerUltrabug <ultrabug@gentoo.org>2015-02-10 19:48:00 +0100
commit232b6d4ec721ecc52a1525afe5a1ca9762ca70bb (patch)
treedd85730047b9a46e57b903603cda86911b6fb011 /py3status/__init__.py
parenteddf98747526825178bbf768c2979e28b34f9ef0 (diff)
lower the click event refresh mechanism rate limit to 100ms
Diffstat (limited to 'py3status/__init__.py')
-rwxr-xr-xpy3status/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/py3status/__init__.py b/py3status/__init__.py
index 65f3d2f..25b994b 100755
--- a/py3status/__init__.py
+++ b/py3status/__init__.py
@@ -542,7 +542,7 @@ class Events(Thread):
"""
Force a cache expiration for all the methods of the given module.
- We rate limit the i3status refresh to 1/s for obvious abusive behavior.
+ We rate limit the i3status refresh to 100ms for obvious abusive behavior.
"""
module = self.modules.get(module_name)
if module is not None:
@@ -551,7 +551,7 @@ class Events(Thread):
for obj in module.methods.values():
obj['cached_until'] = time()
else:
- if time() > (self.last_refresh_ts + 1):
+ if time() > (self.last_refresh_ts + 0.1):
if self.config['debug']:
syslog(
LOG_INFO,
@@ -565,9 +565,9 @@ class Events(Thread):
Force a full refresh of py3status and i3status modules by sending
a SIGUSR1 signal to py3status.
- We rate limit this command to 1/s for obvious abusive behavior.
+ We rate limit this command to 100ms for obvious abusive behavior.
"""
- if time() > (self.last_refresh_ts + 1):
+ if time() > (self.last_refresh_ts + 0.1):
call(['killall', '-s', 'USR1', 'py3status'])
self.last_refresh_ts = time()