Skip to content

Commit

Permalink
Fix compilation error.
Browse files Browse the repository at this point in the history
Signed-off-by: RileyW <wrllrwwrllrw@gmail.com>
  • Loading branch information
RileyWen committed Dec 11, 2024
1 parent 01c1d8a commit 64acca1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/CraneCtld/CtldGrpcServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ class CforedStreamWriter {
crane::grpc::StreamCforedRequest> *stream)
: m_stream_(stream), m_valid_(true) {}

bool WriteTaskIdReply(pid_t calloc_pid, CraneExpected<task_id_t> res) {
bool WriteTaskIdReply(pid_t calloc_pid,
std::expected<task_id_t, std::string> res) {
LockGuard guard(&m_stream_mtx_);
if (!m_valid_) return false;

Expand All @@ -66,7 +67,8 @@ class CforedStreamWriter {

bool WriteTaskResAllocReply(
task_id_t task_id,
CraneExpected<std::pair<std::string, std::list<CranedId>>> res) {
std::expected<std::pair<std::string, std::list<CranedId>>, std::string>
res) {
LockGuard guard(&m_stream_mtx_);
if (!m_valid_) return false;

Expand Down Expand Up @@ -118,7 +120,7 @@ class CforedStreamWriter {
return m_stream_->Write(reply);
}

bool WriteCforedRegistrationAck(const CraneExpected<void> &res) {
bool WriteCforedRegistrationAck(const std::expected<void, std::string> &res) {
LockGuard guard(&m_stream_mtx_);
if (!m_valid_) return false;

Expand Down

0 comments on commit 64acca1

Please sign in to comment.