mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
Split freqtrade.system into a package
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# flake8: noqa: F401
|
||||
|
||||
from freqtrade.configuration.asyncio_config import asyncio_setup
|
||||
from freqtrade.configuration.config_secrets import sanitize_config
|
||||
from freqtrade.configuration.config_setup import setup_utils_configuration
|
||||
from freqtrade.configuration.config_validation import validate_config_consistency
|
||||
|
||||
@@ -18,7 +18,8 @@ from freqtrade.commands import Arguments
|
||||
from freqtrade.constants import DOCS_LINK
|
||||
from freqtrade.exceptions import ConfigurationError, FreqtradeException, OperationalException
|
||||
from freqtrade.loggers import setup_logging_pre
|
||||
from freqtrade.system import asyncio_setup, gc_set_threshold
|
||||
from freqtrade.system.asyncio_config import asyncio_setup
|
||||
from freqtrade.system.gc_setup import gc_set_threshold
|
||||
|
||||
|
||||
logger = logging.getLogger("freqtrade")
|
||||
|
||||
1
freqtrade/system/__init__.py
Normal file
1
freqtrade/system/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""system specific and performance tuning"""
|
||||
@@ -1,23 +1,11 @@
|
||||
"""System specific or performance tuning"""
|
||||
|
||||
import gc
|
||||
import logging
|
||||
import platform
|
||||
import sys
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def asyncio_setup() -> None: # pragma: no cover
|
||||
# Set eventloop for win32 setups
|
||||
|
||||
if sys.platform == "win32":
|
||||
import asyncio
|
||||
|
||||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
||||
|
||||
|
||||
def gc_set_threshold():
|
||||
"""
|
||||
Reduce number of GC runs to improve performance (explanation video)
|
||||
Reference in New Issue
Block a user