Commit 96b3dfd8 authored by Wei Shoulin's avatar Wei Shoulin
Browse files

add pipeline_id

parent f55e786a
......@@ -51,7 +51,7 @@ class Level1DataApi(object):
return Result.error(message = str(resp.error.detail))
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):
''' fetch a record from database
......@@ -74,7 +74,7 @@ class Level1DataApi(object):
return Result.ok_data(data = Level1Record().from_proto_model(resp.record))
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):
''' update the status of reduction
......@@ -97,7 +97,7 @@ class Level1DataApi(object):
else:
return Result.error(message = str(resp.error.detail))
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):
''' update the status of QC0
......@@ -118,7 +118,7 @@ class Level1DataApi(object):
else:
return Result.error(message = str(resp.error.detail))
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):
''' insert a level1 record into database
......@@ -170,4 +170,4 @@ class Level1DataApi(object):
else:
return Result.error(message = str(resp.error.detail))
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()))
......@@ -39,7 +39,7 @@ class Level1PrcApi(object):
return Result.error(message = str(resp.error.detail))
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):
''' update the status of reduction
......@@ -63,7 +63,7 @@ class Level1PrcApi(object):
else:
return Result.error(message = str(resp.error.detail))
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):
''' insert a level1 procedure record into database
......@@ -97,7 +97,7 @@ class Level1PrcApi(object):
else:
return Result.error(message = str(resp.error.detail))
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()))
......@@ -51,7 +51,7 @@ class Level2SpectraApi(object):
return Result.error(message = str(resp.error.detail))
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):
''' fetch a record from database
......@@ -73,7 +73,7 @@ class Level2SpectraApi(object):
return Result.ok_data(data = Level2Spectra().from_proto_model(resp.record))
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):
''' update the status of reduction
......@@ -96,7 +96,7 @@ class Level2SpectraApi(object):
else:
return Result.error(message = str(resp.error.detail))
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):
''' update the status of QC0
......@@ -117,7 +117,7 @@ class Level2SpectraApi(object):
else:
return Result.error(message = str(resp.error.detail))
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):
''' insert a level2spectra record into database
......@@ -168,4 +168,4 @@ class Level2SpectraApi(object):
else:
return Result.error(message = str(resp.error.detail))
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()))
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