From d361f3a1c1518ee4cf5afc35ecb9e207b8b71eee Mon Sep 17 00:00:00 2001 From: yhydev Date: Tue, 6 Jan 2026 17:43:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=95=B0=E6=8D=AE=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudbt/run_cloudbt.py | 49 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/cloudbt/run_cloudbt.py b/cloudbt/run_cloudbt.py index d7f1f82..a850e6b 100644 --- a/cloudbt/run_cloudbt.py +++ b/cloudbt/run_cloudbt.py @@ -185,13 +185,13 @@ def split_pairs(pairs: List[str], jobs: int = None, max_pairs: int = None) -> Li return chunks -def submit_job(timeframe: str, timerange: str, pairs_chunk: List[str], +def submit_job(name:str, timeframe: str, timerange: str, pairs_chunk: List[str], strategy: str, start_datetime: str, job_id: int, working_url: str) -> None: """Submit job function (placeholder implementation)""" - script = generate_shell_script(timeframe, timerange, + script = generate_shell_script(name, timeframe, timerange, pairs_chunk, strategy, start_datetime, job_id, working_url) requests.post( "https://prefect.oopsapi.com/api/deployments/dac4e321-cc60-4ca2-8aba-ee389d395ae9/create_flow_run", @@ -202,7 +202,7 @@ def submit_job(timeframe: str, timerange: str, pairs_chunk: List[str], } ) -def generate_shell_script(timeframe: str, timerange: str, pairs_chunk: List[str], +def generate_shell_script(name:str, timeframe: str, timerange: str, pairs_chunk: List[str], strategy: str, start_datetime: str, job_id: int, @@ -211,6 +211,43 @@ def generate_shell_script(timeframe: str, timerange: str, pairs_chunk: List[str] Generate a shell script for the given timeframe, timerange, and pairs chunk. """ BUCKET_NAME = os.environ.get("BUCKET_NAME", "backresult") + + upload_data_script = """ +function upload_data(){ + path=$1 + filename=$(basename "$path") + label=$2 + body=$(cat <