mirror of
https://github.com/halfwaystudent/douyin-sparkflow.git
synced 2026-07-02 04:41:23 +08:00
Fix scheduled cron trigger timestamp formatting
This commit is contained in:
@@ -72,7 +72,7 @@ def build_task_run_spec():
|
||||
def build_scheduled_task_command():
|
||||
if running_in_container():
|
||||
return (
|
||||
"/bin/bash -lc 'timestamp=$(date \"+%F %T %Z\"); "
|
||||
"/bin/bash -lc 'timestamp=$(date -Iseconds); "
|
||||
"echo \"[AUTO_TRIGGER] $timestamp scheduled send start\"; "
|
||||
"container=$(docker ps --format \"{{.Names}}\" | "
|
||||
"grep -E \"^(douyin-web-hostfix|douyin-web)$\" | head -n 1); "
|
||||
@@ -88,14 +88,14 @@ def build_scheduled_task_command():
|
||||
compose_root_quoted = shlex.quote(str(compose_root()))
|
||||
return (
|
||||
"/bin/bash -lc "
|
||||
f"'echo \"[AUTO_TRIGGER] $(date \"+%F %T %Z\") compose task start\"; "
|
||||
f"'echo \"[AUTO_TRIGGER] $(date -Iseconds) compose task start\"; "
|
||||
f"cd {compose_root_quoted} && /usr/bin/docker compose run --rm task'"
|
||||
)
|
||||
repo_root_quoted = shlex.quote(str(repo_root()))
|
||||
python_quoted = shlex.quote(sys.executable)
|
||||
return (
|
||||
"/bin/bash -lc "
|
||||
f"'echo \"[AUTO_TRIGGER] $(date \"+%F %T %Z\") local task start\"; "
|
||||
f"'echo \"[AUTO_TRIGGER] $(date -Iseconds) local task start\"; "
|
||||
f"cd {repo_root_quoted} && {python_quoted} main.py --doTask'"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user