Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-client
Commits
9546a255
Commit
9546a255
authored
Jan 02, 2025
by
Wei Shoulin
Browse files
msg proc
parent
1fd22253
Pipeline
#7670
failed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_dfs_client/level0.py
View file @
9546a255
...
@@ -75,7 +75,10 @@ def find(project_id: Optional[str] = None,
...
@@ -75,7 +75,10 @@ def find(project_id: Optional[str] = None,
if
obs_time
is
not
None
:
if
obs_time
is
not
None
:
params
[
'obs_time_start'
],
params
[
'obs_time_end'
]
=
obs_time
params
[
'obs_time_start'
],
params
[
'obs_time_end'
]
=
obs_time
utils
.
is_valid_datetime_format
(
params
[
'obs_time_start'
])
or
not
utils
.
is_valid_datetime_format
(
params
[
'obs_time_end'
])
if
params
[
'obs_time_start'
]
and
utils
.
is_valid_datetime_format
(
params
[
'obs_time_start'
]):
pass
if
params
[
'obs_time_end'
]
and
utils
.
is_valid_datetime_format
(
params
[
'obs_time_end'
]):
pass
if
create_time
is
not
None
:
if
create_time
is
not
None
:
params
[
'create_time_start'
],
params
[
'create_time_end'
]
=
create_time
params
[
'create_time_start'
],
params
[
'create_time_end'
]
=
create_time
utils
.
is_valid_datetime_format
(
params
[
'create_time_start'
])
or
utils
.
is_valid_datetime_format
(
params
[
'create_time_end'
])
utils
.
is_valid_datetime_format
(
params
[
'create_time_start'
])
or
utils
.
is_valid_datetime_format
(
params
[
'create_time_end'
])
...
@@ -176,9 +179,8 @@ def write_cat(local_file: str,
...
@@ -176,9 +179,8 @@ def write_cat(local_file: str,
def
generate_prc_msg
(
module_id
:
Literal
[
'MSC'
,
'IFS'
,
'MCI'
,
'HSTDM'
,
'CPIC'
],
def
generate_prc_msg
(
module_id
:
Literal
[
'MSC'
,
'IFS'
,
'MCI'
,
'HSTDM'
,
'CPIC'
],
obs_id
:
str
,
obs_id
:
str
,
detector_no
:
str
,
detector_no
:
str
,
batch_id
:
str
=
constants
.
DEFAULT_BATCH_ID
,
dataset
:
str
=
constants
.
DEFAULT_DATASET
,
dataset
:
str
=
constants
.
DEFAULT_DATASET
,
pipeline
_id
:
str
=
''
)
->
Result
:
batch
_id
:
str
=
constants
.
DEFAULT_BATCH_ID
)
->
Result
:
"""
"""
生成流水线的处理消息
生成流水线的处理消息
...
@@ -186,7 +188,6 @@ def generate_prc_msg(module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'],
...
@@ -186,7 +188,6 @@ def generate_prc_msg(module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'],
module_id (str): 模块ID
module_id (str): 模块ID
obs_id (str): 观测ID
obs_id (str): 观测ID
detector_no (str): 探测器编号
detector_no (str): 探测器编号
pipeline_id (str): 流水管线ID,默认为空字符串
dataset (Optional[str], optional): 数据集名称..
dataset (Optional[str], optional): 数据集名称..
batch_id (Optional[str], optional): 批次ID. Defaults to 'auto'.
batch_id (Optional[str], optional): 批次ID. Defaults to 'auto'.
...
@@ -197,7 +198,6 @@ def generate_prc_msg(module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'],
...
@@ -197,7 +198,6 @@ def generate_prc_msg(module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'],
params
=
{
params
=
{
'dataset'
:
dataset
,
'dataset'
:
dataset
,
'batch_id'
:
batch_id
,
'batch_id'
:
batch_id
,
'pipeline_id'
:
pipeline_id
,
'obs_id'
:
obs_id
,
'obs_id'
:
obs_id
,
'detector_no'
:
detector_no
,
'detector_no'
:
detector_no
,
}
}
...
...
csst_dfs_client/level1.py
View file @
9546a255
...
@@ -209,7 +209,6 @@ def write(local_file: Union[IO, str],
...
@@ -209,7 +209,6 @@ def write(local_file: Union[IO, str],
def
generate_prc_msg
(
module_id
:
Literal
[
'MSC'
,
'IFS'
,
'MCI'
,
'HSTDM'
,
'CPIC'
],
def
generate_prc_msg
(
module_id
:
Literal
[
'MSC'
,
'IFS'
,
'MCI'
,
'HSTDM'
,
'CPIC'
],
level1_id
:
str
,
level1_id
:
str
,
pipeline_id
:
Optional
[
str
]
=
''
,
dataset
:
str
=
constants
.
DEFAULT_DATASET
,
dataset
:
str
=
constants
.
DEFAULT_DATASET
,
batch_id
:
str
=
constants
.
DEFAULT_BATCH_ID
)
->
Result
:
batch_id
:
str
=
constants
.
DEFAULT_BATCH_ID
)
->
Result
:
"""
"""
...
@@ -229,7 +228,6 @@ def generate_prc_msg(module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'],
...
@@ -229,7 +228,6 @@ def generate_prc_msg(module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'],
params
=
{
params
=
{
'dataset'
:
dataset
,
'dataset'
:
dataset
,
'batch_id'
:
batch_id
,
'batch_id'
:
batch_id
,
'pipeline_id'
:
pipeline_id
,
'level1_id'
:
level1_id
,
'level1_id'
:
level1_id
,
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment