Commit cb6500aa authored by Wei Shoulin's avatar Wei Shoulin
Browse files

status-1

parent 54cda723
...@@ -42,8 +42,8 @@ def ingesst_one(file_path, db, copyfiles): ...@@ -42,8 +42,8 @@ def ingesst_one(file_path, db, copyfiles):
module_id = header["INSTRUME"] module_id = header["INSTRUME"]
obs_type = header["FILETYPE"] obs_type = header["FILETYPE"]
qc0_status = 0 qc0_status = -1
prc_status = 0 prc_status = -1
time_now = datetime.datetime.now() time_now = datetime.datetime.now()
create_time = time_now.strftime('%Y-%m-%d %H:%M:%S') create_time = time_now.strftime('%Y-%m-%d %H:%M:%S')
......
...@@ -190,7 +190,7 @@ class CalMergeApi(object): ...@@ -190,7 +190,7 @@ class CalMergeApi(object):
exp_time = get_parameter(kwargs, "exp_time"), exp_time = get_parameter(kwargs, "exp_time"),
filename = get_parameter(kwargs, "filename"), filename = get_parameter(kwargs, "filename"),
file_path = get_parameter(kwargs, "file_path"), file_path = get_parameter(kwargs, "file_path"),
prc_status = get_parameter(kwargs, "prc_status"), prc_status = get_parameter(kwargs, "prc_status", -1),
prc_time = get_parameter(kwargs, "prc_time"), prc_time = get_parameter(kwargs, "prc_time"),
level0_ids = get_parameter(kwargs, "level0_ids", []) level0_ids = get_parameter(kwargs, "level0_ids", [])
) )
......
...@@ -191,7 +191,7 @@ class Level0DataApi(object): ...@@ -191,7 +191,7 @@ class Level0DataApi(object):
self.db.execute( self.db.execute(
'INSERT INTO t_level0_data (obs_id, detector_no, obs_type, obs_time, exp_time,detector_status_id, filename, file_path,qc0_status, prc_status,create_time) \ 'INSERT INTO t_level0_data (obs_id, detector_no, obs_type, obs_time, exp_time,detector_status_id, filename, file_path,qc0_status, prc_status,create_time) \
VALUES(?,?,?,?,?,?,?,?,?,?,?)', VALUES(?,?,?,?,?,?,?,?,?,?,?)',
(rec.obs_id, rec.detector_no, rec.obs_type, rec.obs_time, rec.exp_time, rec.detector_status_id, rec.filename, rec.file_path,0,0,format_time_ms(time.time())) (rec.obs_id, rec.detector_no, rec.obs_type, rec.obs_time, rec.exp_time, rec.detector_status_id, rec.filename, rec.file_path,-1,-1,format_time_ms(time.time()))
) )
self.db.end() self.db.end()
rec.id = self.db.last_row_id() rec.id = self.db.last_row_id()
......
...@@ -102,7 +102,7 @@ class Level0PrcApi(object): ...@@ -102,7 +102,7 @@ class Level0PrcApi(object):
pipeline_id = get_parameter(kwargs, "pipeline_id"), pipeline_id = get_parameter(kwargs, "pipeline_id"),
prc_module = get_parameter(kwargs, "prc_module"), prc_module = get_parameter(kwargs, "prc_module"),
params_id = get_parameter(kwargs, "params_id"), params_id = get_parameter(kwargs, "params_id"),
prc_status = get_parameter(kwargs, "prc_status"), prc_status = get_parameter(kwargs, "prc_status", -1),
prc_time = get_parameter(kwargs, "prc_time"), prc_time = get_parameter(kwargs, "prc_time"),
file_path = get_parameter(kwargs, "file_path") file_path = get_parameter(kwargs, "file_path")
) )
......
...@@ -178,7 +178,7 @@ class ObservationApi(object): ...@@ -178,7 +178,7 @@ class ObservationApi(object):
self.db.execute( self.db.execute(
'INSERT INTO t_observation (id,obs_time,exp_time,module_id,obs_type,facility_status_id, module_status_id, qc0_status,create_time) \ 'INSERT INTO t_observation (id,obs_time,exp_time,module_id,obs_type,facility_status_id, module_status_id, qc0_status,create_time) \
VALUES(?,?,?,?,?,?,?,?,?)', VALUES(?,?,?,?,?,?,?,?,?)',
(obs_id, obs_time, exp_time, module_id, obs_type, facility_status_id, module_status_id,0,format_time_ms(time.time())) (obs_id, obs_time, exp_time, module_id, obs_type, facility_status_id, module_status_id,-1,format_time_ms(time.time()))
) )
self.db.end() self.db.end()
......
...@@ -187,8 +187,8 @@ class Level1DataApi(object): ...@@ -187,8 +187,8 @@ class Level1DataApi(object):
bias_id = get_parameter(kwargs, "bias_id"), bias_id = get_parameter(kwargs, "bias_id"),
filename = get_parameter(kwargs, "filename"), filename = get_parameter(kwargs, "filename"),
file_path = get_parameter(kwargs, "file_path"), file_path = get_parameter(kwargs, "file_path"),
prc_status = get_parameter(kwargs, "prc_status"), prc_status = get_parameter(kwargs, "prc_status", -1),
prc_time = get_parameter(kwargs, "prc_time"), prc_time = get_parameter(kwargs, "prc_time", format_datetime(datetime.datetime.now())),
pipeline_id = get_parameter(kwargs, "pipeline_id") pipeline_id = get_parameter(kwargs, "pipeline_id")
) )
existed = self.db.exists( existed = self.db.exists(
...@@ -202,7 +202,7 @@ class Level1DataApi(object): ...@@ -202,7 +202,7 @@ class Level1DataApi(object):
self.db.execute( self.db.execute(
'INSERT INTO msc_level1_data (raw_id,data_type,cor_sci_id,prc_params,flat_id,dark_id,bias_id,filename,file_path,qc1_status,prc_status,create_time,pipeline_id) \ 'INSERT INTO msc_level1_data (raw_id,data_type,cor_sci_id,prc_params,flat_id,dark_id,bias_id,filename,file_path,qc1_status,prc_status,create_time,pipeline_id) \
VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)', VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)',
(rec.raw_id, rec.data_type, rec.cor_sci_id, rec.prc_params, rec.flat_id, rec.dark_id, rec.bias_id, rec.filename, rec.file_path, 0, 0, format_time_ms(time.time()),rec.pipeline_id,) (rec.raw_id, rec.data_type, rec.cor_sci_id, rec.prc_params, rec.flat_id, rec.dark_id, rec.bias_id, rec.filename, rec.file_path, -1, -1, format_time_ms(time.time()),rec.pipeline_id,)
) )
self.db.end() self.db.end()
rec.id = self.db.last_row_id() rec.id = self.db.last_row_id()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment