import os
import sys

sys.path.append(os.path.dirname(sys.path[0]))

from utils.DolphinschedulerHelper import DolphinschedulerHelper

if __name__ == '__main__':
    arr = [
        {"site_name": "us", "date_info": "2023-03-01"},
        {"site_name": "us", "date_info": "2023-04-01"},
        {"site_name": "us", "date_info": "2023-05-01"},
        {"site_name": "us", "date_info": "2023-06-01"},
        {"site_name": "us", "date_info": "2023-07-01"},
        {"site_name": "us", "date_info": "2023-08-01"},
    ]
    for item in arr:
        DolphinschedulerHelper.start_and_watch_process_instance(
            project_name='其他项目',
            process_df_name='重跑dwt_bsr_asin_detail并导出',
            startParams=item,
            sleep=60
        )
