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
ffd929c4
Commit
ffd929c4
authored
May 23, 2025
by
BO ZHANG
🏀
Browse files
add --demo
parent
c7e9f076
Changes
3
Hide whitespace changes
Inline
Side-by-side
csst_dag/cli/msc.py
View file @
ffd929c4
...
...
@@ -34,6 +34,7 @@ parser.add_argument(
parser
.
add_argument
(
"--final-prc-status"
,
type
=
int
,
help
=
"Final processing status"
,
default
=-
2
)
parser
.
add_argument
(
"--demo"
,
type
=
bool
,
help
=
"Demo mode"
,
default
=
False
)
args
=
parser
.
parse_args
()
print
(
"CLI parameters: "
,
args
)
...
...
@@ -61,7 +62,7 @@ for obs_type, dag_ids in DAG_LOOP_MAP.items():
batch_id
=
args
.
batch_id
,
initial_prc_status
=
args
.
initial_prc_status
,
final_prc_status
=
args
.
final_prc_status
,
demo
=
True
,
demo
=
args
.
demo
,
priority
=
args
.
priority
,
)
print
(
f
"
{
len
(
msgs
)
}
tasks."
)
csst_dag/dag/l1.py
View file @
ffd929c4
...
...
@@ -151,9 +151,8 @@ class CsstL1(BaseDAG):
):
assert
kwargs
.
keys
()
<=
SCHEDULE_KWARGS
,
f
"Unknown kwargs:
{
kwargs
.
keys
()
}
"
# no need to query plan
#
plan
.
write_file
(
local_path
=
"plan.json"
)
#
plan.write_file(local_path="plan.json")
# plan.find(
# instrument="MSC",
# dataset=dataset,
...
...
gen_msg.py
deleted
100644 → 0
View file @
c7e9f076
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