Commit e9c9f341 authored by Michal Čihař's avatar Michal Čihař

Using global here

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent f997dd95
...@@ -255,6 +255,7 @@ class UnitManager(models.Manager): ...@@ -255,6 +255,7 @@ class UnitManager(models.Manager):
""" """
Finds closely similar units. Finds closely similar units.
""" """
global WORKER_POOL
if WORKER_POOL is None: if WORKER_POOL is None:
WORKER_POOL = multiprocessing.Pool(processes=4) WORKER_POOL = multiprocessing.Pool(processes=4)
result = WORKER_POOL.apply_async( result = WORKER_POOL.apply_async(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment