This commit is contained in:
David Brazda
2023-11-21 17:30:40 +01:00
parent ca2d02fed7
commit d621004f9a
3 changed files with 4 additions and 7 deletions

View File

@ -1,5 +0,0 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@ -6,9 +6,9 @@ from pathlib import Path
#directory for generated images and basic reports #directory for generated images and basic reports
MEDIA_DIRECTORY = Path(__file__).parent.parent.parent / "media" MEDIA_DIRECTORY = Path(__file__).parent.parent.parent / "media"
#location of strat.log - it is used to fetch by gui
LOG_FILE = Path(__file__).parent.parent / "strat.log" LOG_FILE = Path(__file__).parent.parent / "strat.log"
#'0.0.0.0', #'0.0.0.0',
#currently only prod server has acces to LIVE #currently only prod server has acces to LIVE
PROD_SERVER_HOSTNAMES = ['tradingeastcoast','David-MacBook-Pro.local'] #,'David-MacBook-Pro.local' PROD_SERVER_HOSTNAMES = ['tradingeastcoast','David-MacBook-Pro.local'] #,'David-MacBook-Pro.local'

View File

@ -37,7 +37,7 @@ from v2realbot.strategyblocks.indicators.indicators_hub import populate_dynamic_
from v2realbot.interfaces.backtest_interface import BacktestInterface from v2realbot.interfaces.backtest_interface import BacktestInterface
import os import os
from v2realbot.reporting.metricstoolsimage import generate_trading_report_image from v2realbot.reporting.metricstoolsimage import generate_trading_report_image
import gc
#from pyinstrument import Profiler #from pyinstrument import Profiler
#adding lock to ensure thread safety of TinyDB (in future will be migrated to proper db) #adding lock to ensure thread safety of TinyDB (in future will be migrated to proper db)
lock = Lock() lock = Lock()
@ -524,6 +524,8 @@ def batch_run_manager(id: UUID, runReq: RunRequest, rundays: list[RunDay]):
except Exception as e: except Exception as e:
print("Nepodarilo se vytvorit report image", str(e)+format_exc()) print("Nepodarilo se vytvorit report image", str(e)+format_exc())
gc.collect()
#stratin run #stratin run
def run_stratin(id: UUID, runReq: RunRequest, synchronous: bool = False, inter_batch_params: dict = None): def run_stratin(id: UUID, runReq: RunRequest, synchronous: bool = False, inter_batch_params: dict = None):
if runReq.mode == Mode.BT: if runReq.mode == Mode.BT: