demo_facility_level0_prc.py 507 Bytes
Newer Older
Wei Shoulin's avatar
demo  
Wei Shoulin committed
1
2
3
4
5
from csst_dfs_api.facility.level0prc import Level0PrcApi

api = Level0PrcApi()

#find
Wei Shoulin's avatar
Wei Shoulin committed
6
recs = api.find(level0_id='134')
Wei Shoulin's avatar
demo  
Wei Shoulin committed
7
8
9
print('find:', recs)

#update_proc_status
Wei Shoulin's avatar
Wei Shoulin committed
10
rec = api.update_proc_status(id = 2, status = 4)
Wei Shoulin's avatar
demo  
Wei Shoulin committed
11
12
13
print('update_proc_status:', rec)

#write
Wei Shoulin's avatar
Wei Shoulin committed
14
15
rec = api.write(
    level0_id='134', 
Wei Shoulin's avatar
demo  
Wei Shoulin committed
16
17
    pipeline_id = "P1",
    prc_module = "QC0",
Wei Shoulin's avatar
Wei Shoulin committed
18
    params_file_path = "/opt/dddasd.params",
Wei Shoulin's avatar
demo  
Wei Shoulin committed
19
20
    prc_status = 3,
    prc_time = '2021-06-04 11:12:13',
Wei Shoulin's avatar
Wei Shoulin committed
21
    result_file_path = "/opt/dddasd.header")
Wei Shoulin's avatar
demo  
Wei Shoulin committed
22
print('write:', rec)