demo_facility_observation.py 461 Bytes
Newer Older
Wei Shoulin's avatar
demo  
Wei Shoulin committed
1
2
3
4
5
6

from csst_dfs_api.facility.observation import ObservationApi

api = ObservationApi()

#find 
Wei Shoulin's avatar
test    
Wei Shoulin committed
7
recs = api.find(module_id="MSC",limit = 0, prc_status =-1)
Wei Shoulin's avatar
demo  
Wei Shoulin committed
8
9
10
print('find:', recs)

# get
Wei Shoulin's avatar
Wei Shoulin committed
11
rec = api.get(obs_id='17')
Wei Shoulin's avatar
demo  
Wei Shoulin committed
12
13
14
print('get:', rec)

# update_proc_status
Wei Shoulin's avatar
Wei Shoulin committed
15
rec = api.update_proc_status(obs_id = '17', status = 3,)
Wei Shoulin's avatar
demo  
Wei Shoulin committed
16
17
18
print('update_proc_status:', rec)

# update_qc0_status
Wei Shoulin's avatar
Wei Shoulin committed
19
rec = api.update_qc0_status(obs_id = '17', status = 3,)
Wei Shoulin's avatar
demo  
Wei Shoulin committed
20
21
print('update_qc0_status:', rec)