diff options
Diffstat (limited to 'python/client.py')
| -rw-r--r-- | python/client.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/client.py b/python/client.py index 519b3ea2..84e44a50 100644 --- a/python/client.py +++ b/python/client.py @@ -2,14 +2,16 @@ import redis import tasks from json import loads, dumps import socket +import os def run(): hostname = socket.gethostname() if hostname == 'debian': q = redis.Redis(unix_socket_path='/var/run/redis/redis.sock') + os.environ['OMP_NUM_THREADS'] = '8' elif hostname == 'gomez': q = redis.Redis(host='debian') - + os.environ['OMP_NUM_THREADS'] = '4' while True: f, args = loads(q.blpop("tasks")[1].decode('utf-8')) getattr(tasks, f)(*args) |
