aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/client.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/python/client.py b/python/client.py
index cf143c93..a8a971be 100644
--- a/python/client.py
+++ b/python/client.py
@@ -6,18 +6,12 @@ import tasks
from json import loads, dumps
from db import dbconn
+from process_queue import get_redis_queue
def run():
hostname = socket.gethostname()
ET = dbconn('etdb')
- if hostname in ['debian', 'gomez']:
- q = redis.Redis(host='ziggy')
- os.environ['OMP_NUM_THREADS'] = '4'
- if hostname == 'debian':
- os.environ['OMP_NUM_THREADS'] = '8'
- elif hostname == 'ziggy':
- q = redis.Redis(unix_socket_path='/run/redis/redis.sock')
- os.environ['OMP_NUM_THREADS'] = '8'
+ q = get_redis_queue()
while True:
f, args = loads(q.blpop("tasks")[1].decode('utf-8'))
if f == 'generate_scenarios':