예제 #1
0
 def __get_start_time_for_testing__():
     dt_now = MyDate.get_datetime_object()
     dt_now = MyDate.adjust_by_seconds(dt_now, 10)
     return str(dt_now.time())[:8]
Copyright: SERTL Analytics, https://sertl-analytics.com
Date: 2019-01-23
"""

from sertl_analytics.constants.pattern_constants import PRD, PPR
from pattern_process_manager import PatternProcessManager, PatternProcess
from pattern_scheduling.pattern_job import MyPatternJob, MySecondJob
from pattern_scheduling.pattern_scheduler import MyPatternScheduler
from pattern_dash.my_dash_job_handler import MyDashJobHandler
from time import sleep
from sertl_analytics.mydates import MyDate

process_manager = PatternProcessManager()
scheduler_run_interval_sec = 10
dt_now = MyDate.get_datetime_object()
dt_start_01 = MyDate.adjust_by_seconds(dt_now, 10)
dt_start_02 = MyDate.adjust_by_seconds(dt_start_01, scheduler_run_interval_sec)
start_time_01 = str(dt_start_01.time())[:8]
start_time_02 = str(dt_start_02.time())[:8]
# start_time_list = [start_time_01, start_time_02]
start_time_list = [start_time_02]
weekday_list = [0, 1, 2, 3, 4, 5, 6]

undefined_process = process_manager.get_process_by_name(
    PPR.RUN_UNDEFINED_PROCESS)
update_trade_process = process_manager.get_process_by_name(
    PPR.UPDATE_TRADE_RECORDS)


@undefined_process.process_decorator
def test_function_01(number: int, process=None):