mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
fix: attempt to work around deprecation message
This commit is contained in:
@@ -7,7 +7,7 @@ import logging
|
|||||||
import sys
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
from datetime import UTC, datetime
|
from datetime import UTC, datetime
|
||||||
from multiprocessing import Manager
|
from multiprocessing import Manager, get_all_start_methods, set_start_method
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@@ -125,6 +125,12 @@ class HyperOptimizer:
|
|||||||
local_queue must be a global and passed to the child process via inheritance.
|
local_queue must be a global and passed to the child process via inheritance.
|
||||||
"""
|
"""
|
||||||
global log_queue
|
global log_queue
|
||||||
|
try:
|
||||||
|
sms = get_all_start_methods()
|
||||||
|
if "forkserver" in sms:
|
||||||
|
set_start_method("forkserver")
|
||||||
|
except RuntimeError:
|
||||||
|
pass # start method has already been set
|
||||||
m = Manager()
|
m = Manager()
|
||||||
log_queue = m.Queue()
|
log_queue = m.Queue()
|
||||||
logger.info(f"manager queue {type(log_queue)}")
|
logger.info(f"manager queue {type(log_queue)}")
|
||||||
|
|||||||
Reference in New Issue
Block a user