From 838cc601614329ae5b2c20834cf3df0dca424ce1 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Mon, 28 Sep 2020 20:06:57 +0100 Subject: [PATCH] conditional import --- lbry/wallet/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lbry/wallet/database.py b/lbry/wallet/database.py index bd7439c5f..07bb66a1f 100644 --- a/lbry/wallet/database.py +++ b/lbry/wallet/database.py @@ -8,7 +8,6 @@ from collections import defaultdict from dataclasses import dataclass from contextvars import ContextVar from concurrent.futures.thread import ThreadPoolExecutor -from concurrent.futures.process import ProcessPoolExecutor from typing import Tuple, List, Union, Callable, Any, Awaitable, Iterable, Dict, Optional from datetime import date from prometheus_client import Gauge, Counter, Histogram @@ -65,6 +64,7 @@ def run_read_only_fetchone(sql, params): if platform.system() == 'Windows' or 'ANDROID_ARGUMENT' or 'KIVY_BUILD' in os.environ: ReaderExecutorClass = ThreadPoolExecutor else: + from concurrent.futures.process import ProcessPoolExecutor ReaderExecutorClass = ProcessPoolExecutor