diff options
author | Kali Kaneko <kali@leap.se> | 2014-09-23 12:43:14 -0500 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-02-11 14:03:17 -0400 |
commit | 238822f869f8210883a82f87ae66a48751a7321b (patch) | |
tree | f0644f59ba571099bbf2afb633447be16bf567cf /client | |
parent | 753784542944d12ed736f4c89bd24cb95cb2afbb (diff) |
use max cpu_count workers on pool
Diffstat (limited to 'client')
-rw-r--r-- | client/src/leap/soledad/client/crypto.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/leap/soledad/client/crypto.py b/client/src/leap/soledad/client/crypto.py index d6d9a618..aa8135c0 100644 --- a/client/src/leap/soledad/client/crypto.py +++ b/client/src/leap/soledad/client/crypto.py @@ -521,7 +521,7 @@ class SyncEncryptDecryptPool(object): """ Base class for encrypter/decrypter pools. """ - WORKERS = 5 + WORKERS = multiprocessing.cpu_count() def __init__(self, crypto, sync_db, write_lock): """ @@ -590,7 +590,7 @@ class SyncEncrypterPool(SyncEncryptDecryptPool): of documents to be synced. """ # TODO implement throttling to reduce cpu usage?? - WORKERS = 5 + WORKERS = multiprocessing.cpu_count() TABLE_NAME = "docs_tosync" FIELD_NAMES = "doc_id, rev, content" |