run.py 658 Bytes
Newer Older
BO ZHANG's avatar
BO ZHANG committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os
import sys

from csst_common.cicd import Pipeline

# configure pipeline
p = Pipeline(
    dir_input="/pipeline/input",
    dir_output="/pipeline/output",
    dir_aux="/pipeline/aux",
    dfs_root="/dfs_root",
    ccds_root="/ccds_root",
    ccds_cache="/pipeline/ccds_cache",
    pipeline_log="pipeline.log",
    clean_output_before_run=True,
    filter_warnings=False,
BO ZHANG's avatar
tweaks    
BO ZHANG committed
17
18
    dfs=False,
    ccds=False,
BO ZHANG's avatar
BO ZHANG committed
19
20
21
22
23
)
p.info()


# parse JSON message
BO ZHANG's avatar
tweaks    
BO ZHANG committed
24
25
26
27
28
29
30
if len(sys.argv) == 2:
    msg = sys.argv[1]
else:
    raise ValueError("sys.argv[1] is required")
d = p.message.msg2dict(msg)

print(f"Input message: {d}")
BO ZHANG's avatar
BO ZHANG committed
31
32
p.pipeline_logger.info(f"sys.argv = {sys.argv}")
exit(0)