Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
csst
Scalebox Apps
Commits
7155649f
Commit
7155649f
authored
Aug 19, 2024
by
Zhang Xiaoli
Browse files
Merge
http://hub.cstcloud.cn/git/csst/scalebox-apps
parents
0bc11edb
9dea4b26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
L1/dockerfiles/adm-L1/mgL1.py
L1/dockerfiles/adm-L1/mgL1.py
+28
-11
No files found.
L1/dockerfiles/adm-L1/mgL1.py
View file @
7155649f
...
...
@@ -30,19 +30,36 @@ class admL1Api():
# cursor.execute(admsql)
# admrows = cursor.fetchone()
# current_job_id = admrows[0]
#当前模块的id
current_job_id
=
os
.
getenv
(
'JOB_ID'
)
sink_job_name
=
""
if
obsid
==
1
:
admL1Api
.
sum_numbers
(
body
,
"msc-l1-mbi"
,
current_job_id
)
admL1Api
.
sum_numbers
(
body
,
"msc-l1-sls2d"
,
current_job_id
)
elif
obsid
==
2
:
admL1Api
.
sum_numbers
(
body
,
"mci-l1"
,
current_job_id
)
elif
obsid
==
3
:
admL1Api
.
sum_numbers
(
body
,
"ifs-l1-rss"
,
current_job_id
)
elif
obsid
==
4
:
admL1Api
.
sum_numbers
(
body
,
"cpic-l1"
,
current_job_id
)
elif
obsid
==
5
:
admL1Api
.
sum_numbers
(
body
,
"hstdm-l1"
,
current_job_id
)
body
=
body
.
replace
(
' '
,
'-'
)
# 将数字转换为字符串
body_str
=
str
(
body
)
# 获取前三位
obsid
=
body_str
[:
3
]
# 获取后两位
chipid
=
body_str
[
-
2
:]
moduleid
=
""
if
obsid
==
"101"
:
if
chipid
in
{
"06"
,
"07"
,
"08"
,
"09"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"22"
,
"23"
,
"24"
,
"25"
}:
admL1Api
.
sum_numbers
(
body
,
"msc-l1-mbi"
,
current_job_id
)
elif
chipid
in
{
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"10"
,
"21"
,
"26"
,
"27"
,
"28"
,
"29"
,
"30"
}:
admL1Api
.
sum_numbers
(
body
,
"msc-l1-sls2d"
,
current_job_id
)
else
:
print
(
"101未发送"
)
elif
obsid
==
"108"
:
if
chipid
in
{
"06"
,
"07"
,
"08"
,
"09"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"22"
,
"23"
,
"24"
,
"25"
}:
admL1Api
.
sum_numbers
(
body
,
"msc-l1-mbi"
,
current_job_id
)
elif
chipid
in
{
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"10"
,
"21"
,
"26"
,
"27"
,
"28"
,
"29"
,
"30"
}:
admL1Api
.
sum_numbers
(
body
,
"msc-l1-sls2d"
,
current_job_id
)
else
:
print
(
"201未发送"
)
elif
obsid
==
"110"
:
admL1Api
.
sum_numbers
(
body
,
"msc-l1-ooc"
,
current_job_id
)
else
:
sink_job_name
=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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