Commit 212556fd authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

cta-dcache: wrap scheduler::queueRetrieve with try-catch block

parent 133481b5
......@@ -182,13 +182,18 @@ Status CtaRpcImpl::Retrieve(::grpc::ServerContext* context, const ::cta::dcache:
cta::utils::Timer t;
// Queue the request
std::string reqId = m_scheduler->queueRetrieve(instance, retrieveRequest, lc);
sp.add("reqId", reqId);
lc.log(cta::log::INFO, "Retrieve request for storageClass: " + storageClass
try {
std::string reqId = m_scheduler->queueRetrieve(instance, retrieveRequest, lc);
sp.add("reqId", reqId);
lc.log(cta::log::INFO, "Retrieve request for storageClass: " + storageClass
+ " archiveFileId: " + std::to_string(retrieveRequest.archiveFileID)
+ " RequestID: " + reqId);
response->set_reqid(reqId);
response->set_reqid(reqId);
} catch (cta::exception::Exception &ex){
lc.log(cta::log::CRIT, ex.getMessageValue());
return ::grpc::Status(::grpc::StatusCode::INTERNAL, ex.getMessageValue());
}
return Status::OK;
}
......
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