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-dfs
csst-dfs-api-cluster
Commits
96b3dfd8
Commit
96b3dfd8
authored
Nov 05, 2022
by
Wei Shoulin
Browse files
add pipeline_id
parent
f55e786a
Changes
23
Hide whitespace changes
Inline
Side-by-side
csst_dfs_api_cluster/sls/level1.py
View file @
96b3dfd8
...
@@ -51,7 +51,7 @@ class Level1DataApi(object):
...
@@ -51,7 +51,7 @@ class Level1DataApi(object):
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
def
get
(
self
,
**
kwargs
):
def
get
(
self
,
**
kwargs
):
''' fetch a record from database
''' fetch a record from database
...
@@ -74,7 +74,7 @@ class Level1DataApi(object):
...
@@ -74,7 +74,7 @@ class Level1DataApi(object):
return
Result
.
ok_data
(
data
=
Level1Record
().
from_proto_model
(
resp
.
record
))
return
Result
.
ok_data
(
data
=
Level1Record
().
from_proto_model
(
resp
.
record
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
def
update_proc_status
(
self
,
**
kwargs
):
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
''' update the status of reduction
...
@@ -97,7 +97,7 @@ class Level1DataApi(object):
...
@@ -97,7 +97,7 @@ class Level1DataApi(object):
else
:
else
:
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
def
update_qc1_status
(
self
,
**
kwargs
):
def
update_qc1_status
(
self
,
**
kwargs
):
''' update the status of QC0
''' update the status of QC0
...
@@ -118,7 +118,7 @@ class Level1DataApi(object):
...
@@ -118,7 +118,7 @@ class Level1DataApi(object):
else
:
else
:
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
def
write
(
self
,
**
kwargs
):
def
write
(
self
,
**
kwargs
):
''' insert a level1 record into database
''' insert a level1 record into database
...
@@ -170,4 +170,4 @@ class Level1DataApi(object):
...
@@ -170,4 +170,4 @@ class Level1DataApi(object):
else
:
else
:
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
csst_dfs_api_cluster/sls/level1prc.py
View file @
96b3dfd8
...
@@ -39,7 +39,7 @@ class Level1PrcApi(object):
...
@@ -39,7 +39,7 @@ class Level1PrcApi(object):
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
def
update_proc_status
(
self
,
**
kwargs
):
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
''' update the status of reduction
...
@@ -63,7 +63,7 @@ class Level1PrcApi(object):
...
@@ -63,7 +63,7 @@ class Level1PrcApi(object):
else
:
else
:
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
def
write
(
self
,
**
kwargs
):
def
write
(
self
,
**
kwargs
):
''' insert a level1 procedure record into database
''' insert a level1 procedure record into database
...
@@ -97,7 +97,7 @@ class Level1PrcApi(object):
...
@@ -97,7 +97,7 @@ class Level1PrcApi(object):
else
:
else
:
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
csst_dfs_api_cluster/sls/level2spectra.py
View file @
96b3dfd8
...
@@ -51,7 +51,7 @@ class Level2SpectraApi(object):
...
@@ -51,7 +51,7 @@ class Level2SpectraApi(object):
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
def
get
(
self
,
**
kwargs
):
def
get
(
self
,
**
kwargs
):
''' fetch a record from database
''' fetch a record from database
...
@@ -73,7 +73,7 @@ class Level2SpectraApi(object):
...
@@ -73,7 +73,7 @@ class Level2SpectraApi(object):
return
Result
.
ok_data
(
data
=
Level2Spectra
().
from_proto_model
(
resp
.
record
))
return
Result
.
ok_data
(
data
=
Level2Spectra
().
from_proto_model
(
resp
.
record
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
def
update_proc_status
(
self
,
**
kwargs
):
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
''' update the status of reduction
...
@@ -96,7 +96,7 @@ class Level2SpectraApi(object):
...
@@ -96,7 +96,7 @@ class Level2SpectraApi(object):
else
:
else
:
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
def
update_qc1_status
(
self
,
**
kwargs
):
def
update_qc1_status
(
self
,
**
kwargs
):
''' update the status of QC0
''' update the status of QC0
...
@@ -117,7 +117,7 @@ class Level2SpectraApi(object):
...
@@ -117,7 +117,7 @@ class Level2SpectraApi(object):
else
:
else
:
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
def
write
(
self
,
**
kwargs
):
def
write
(
self
,
**
kwargs
):
''' insert a level2spectra record into database
''' insert a level2spectra record into database
...
@@ -168,4 +168,4 @@ class Level2SpectraApi(object):
...
@@ -168,4 +168,4 @@ class Level2SpectraApi(object):
else
:
else
:
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
except
grpc
.
RpcError
as
e
:
except
grpc
.
RpcError
as
e
:
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
))
return
Result
.
error
(
message
=
"%s:%s"
%
(
e
.
code
().
value
,
e
.
details
()
))
Prev
1
2
Next
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