diff options
Diffstat (limited to 'searx/shared/shared_uwsgi.py')
| -rw-r--r-- | searx/shared/shared_uwsgi.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/shared/shared_uwsgi.py b/searx/shared/shared_uwsgi.py index 136bf687e..b42b5fa7b 100644 --- a/searx/shared/shared_uwsgi.py +++ b/searx/shared/shared_uwsgi.py @@ -44,14 +44,15 @@ def schedule(delay, func, *args): def sighandler(signum): now = int(time.time()) + key = 'scheduler_call_time_signal_' + str(signum) uwsgi.lock() try: - updating = uwsgi.cache_get('updating') + updating = uwsgi.cache_get(key) if updating is not None: updating = int.from_bytes(updating, 'big') if now - updating < delay: return - uwsgi.cache_update('updating', now.to_bytes(4, 'big')) + uwsgi.cache_update(key, now.to_bytes(4, 'big')) finally: uwsgi.unlock() func(*args) |