Commit e2cfb184 authored by Wei Shoulin's avatar Wei Shoulin
Browse files

| bug

parent eb1ca1fa
......@@ -154,8 +154,8 @@ def update_prc_status(level1_id: str, file_type: str, prc_status: int, batch_id:
def write(local_file: Union[IO, str],
module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'],
level0_id: Optional[str | None],
level1_id: Optional[str | None],
level0_id: Optional[str],
level1_id: Optional[str],
file_type: str,
file_name: str,
pipeline_id: str,
......@@ -170,8 +170,8 @@ def write(local_file: Union[IO, str],
Args:
local_file (Union[IO, str]): 文件路径或文件对象
module_id ['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC']其中一个,代表: 模块ID
level0_id (Optional[str | None]): 0级数据的ID默认为 None
level1_id (Optional[str | None]): 1级数据的ID默认为 None
level0_id (Optional[str]): 0级数据的ID默认为 None
level1_id (Optional[str]): 1级数据的ID默认为 None
file_type (str): 文件类型
file_name (str): 1级数据文件名
pipeline_id (str): 管线ID
......
......@@ -147,10 +147,10 @@ def update_prc_status_by_file_name(file_name: str, prc_status: int, batch_id: st
def write(local_file: Union[IO, str],
module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'],
level0_id: Optional[str | None],
level1_id: Optional[str | None],
level2_id: Optional[str | None],
brick_id: Optional[int | None],
level0_id: Optional[str],
level1_id: Optional[str],
level2_id: Optional[str],
brick_id: Optional[int],
data_type: str,
file_name: str,
pipeline_id: str,
......@@ -162,12 +162,12 @@ def write(local_file: Union[IO, str],
将本地的2级数据文件写入到DFS中
Args:
local_file (Union[IO | str]): 文件路径 或 文件对象
local_file (Union[IO, str]): 文件路径 或 文件对象
module_id ['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC']其中一个,代表: 模块ID
level0_id (Optional[str | None]): 0级数据的ID默认为 None
level1_id (Optional[str | None]): 1级数据的ID默认为 None
level2_id (Optional[str | None]): 2级数据的ID默认为 None
brick_id (Optional[int | None]): 天区的ID默认为 None
level0_id (Optional[str]): 0级数据的ID默认为 None
level1_id (Optional[str]): 1级数据的ID默认为 None
level2_id (Optional[str]): 2级数据的ID默认为 None
brick_id (Optional[int]): 天区的ID默认为 None
data_type (str): 数据类型,如'csst-msc-l2-mbi-cat'
file_name (str): 2级数据文件名
pipeline_id (str): 管线ID
......
import os
from typing import Optional, IO, Tuple, Literal
from typing import Optional, IO, Tuple, Literal, Union
from .common import request, Result
DateTimeTuple = Tuple[str, str]
......@@ -62,7 +62,7 @@ def find_by_opid(opid: str) -> Result:
"""
return request.get(f"/api/plan/{opid}")
def write_file(local_file: Optional[IO | str], **kwargs) -> Result:
def write_file(local_file: Union[IO, str], **kwargs) -> Result:
"""
将本地json文件或json数据流写入DFS中。
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment