From c57080711eaba26b4733a06bd7fc372ed7bb2a9a Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 20 Jul 2020 10:46:59 -0400 Subject: [PATCH] added 99 as special number for no processes --- lbry/console.py | 2 +- lbry/db/database.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lbry/console.py b/lbry/console.py index f75d847bb..9bf9500f7 100644 --- a/lbry/console.py +++ b/lbry/console.py @@ -88,7 +88,7 @@ class Basic(Console): s.append('Full Node') elif isinstance(self.service, LightClient): s.append('Light Client') - if conf.processes == -1: + if conf.processes in (-1, 99): s.append('Threads Only') elif conf.processes == 0: s.append(f'{os.cpu_count()} Process(es)') diff --git a/lbry/db/database.py b/lbry/db/database.py index b12678388..14e5c6c0a 100644 --- a/lbry/db/database.py +++ b/lbry/db/database.py @@ -162,7 +162,7 @@ class Database: self.message_queue, self.stop_event ) } - if self.processes > 1: + if self.processes > 1 and self.processes != 99: self.executor = ProcessPoolExecutor(max_workers=self.processes, **kwargs) else: self.executor = ThreadPoolExecutor(max_workers=1, **kwargs)