Commit c2ee6cd5 authored by Jeremy Pallats's avatar Jeremy Pallats 💬
Browse files

Create processes according to cpu_count.

parent 48250708
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ import aiozmq.rpc
import cog.util

ADDR = 'tcp://127.0.0.1:{}'.format(cog.util.CONF.ports.zmq)
POOL = cfut.ProcessPoolExecutor(max_workers=6)
POOL = cfut.ProcessPoolExecutor(max_workers=os.cpu_count())


class Scheduler(aiozmq.rpc.AttrHandler):
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ LEN = { # Lengths for strings stored in the db
    "system": 30,
    "weapon_mode": 6,
}
JOB_LIMIT=10
JOB_LIMIT=os.cpu_count()
TIME_FMT = "%d/%m/%y %H:%M:%S"
# These are the faction types strong/weak verse.
HUDSON_BGS = [['Feudal', 'Patronage'], ["Dictatorship"]]