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-cicd
csst-dag
Commits
7992adb4
Commit
7992adb4
authored
Jan 13, 2025
by
BO ZHANG
🏀
Browse files
tweaks
parent
8011a52f
Changes
2
Hide whitespace changes
Inline
Side-by-side
csst_dag/msc/__init__.py
deleted
100644 → 0
View file @
8011a52f
SLS_CHIPID
=
[
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"10"
,
"21"
,
"26"
,
"27"
,
"28"
,
"29"
,
"30"
,
]
MBI_CHIPID
=
[
"06"
,
"07"
,
"08"
,
"09"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"22"
,
"23"
,
"24"
,
"25"
,
]
gen_msg.py
0 → 100644
View file @
7992adb4
import
json
from
astropy
import
time
import
numpy
as
np
def
gen_dag_runid
(
digits
=
10
):
now
=
time
.
Time
.
now
()
dagrunid
=
now
.
iso
[:
10
].
replace
(
"-"
,
""
)
for
i
in
range
(
digits
):
dagrunid
+=
f
"
{
np
.
random
.
randint
(
low
=
0
,
high
=
9
)
}
"
return
dagrunid
def
gen_msg
(
dag_id
=
"csst-msc-l1-mbi"
,
obsid
=
"11009101682009"
,
chipid
=
"09"
):
data
=
{
"dag_id"
:
dag_id
,
"dag_run_id"
:
gen_dag_runid
(),
"message"
:
{
"obsid"
:
obsid
,
"chipid"
:
chipid
,
},
}
msg
=
json
.
dumps
(
data
,
ensure_ascii
=
False
,
indent
=
None
)
print
(
f
"http://localhost:3000/scalebox/run/level0?id=
{
data
[
'dag_run_id'
]
}
"
)
# msg = msg.replace('"', '\\"')
return
msg
gen_msg
()
# def gen_cmd(dag_id="csst-msc-l1-mbi", obsid="11009101682009", chipid="09"):
# msg = gen_msg(dag_id=dag_id, obsid=obsid, chipid=chipid)
# print()
# http://localhost:3000/scalebox/run/level0?id=202411286117850576
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