Update.
This commit is contained in:
parent
0518cdce0b
commit
fb754cad92
@ -26,10 +26,10 @@ class ChannelMessageService(BaseService):
|
||||
self._executor_pools = {}
|
||||
global jinja2_env
|
||||
jinja2_env = self.app.jinja2_env
|
||||
self._max_workers = 1
|
||||
self._max_workers = 3
|
||||
def get_or_create_executor(self, uid):
|
||||
if not uid in self._executor_pools:
|
||||
self._executor_pools[uid] = ProcessPoolExecutor(max_workers=10)
|
||||
self._executor_pools[uid] = ProcessPoolExecutor(max_workers=self._max_workers)
|
||||
print("Executors available", len(self._executor_pools))
|
||||
return self._executor_pools[uid]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user