From 3a9bc3071b9a9452a5aef23c438233fc9e86fb47 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Tue, 12 Aug 2025 13:53:58 +0200 Subject: use new builds api for oplogs (#464) - Improvement: Refactored jupiter oplog export code to reuse builds jupiter wrapper classes - Improvement: If `zen builds`, `zen oplog-import` or `zen oplog-import` command fails due to a http error, the return code for the program will be set to the error/status code --- src/zencore/include/zencore/jobqueue.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/zencore/include') diff --git a/src/zencore/include/zencore/jobqueue.h b/src/zencore/include/zencore/jobqueue.h index d5ec6255a..470ed3fc6 100644 --- a/src/zencore/include/zencore/jobqueue.h +++ b/src/zencore/include/zencore/jobqueue.h @@ -28,6 +28,16 @@ public: virtual void ReportProgress(std::string_view CurrentOp, std::string_view Details, ptrdiff_t TotalCount, ptrdiff_t RemainingCount) = 0; }; +class JobError : public std::runtime_error +{ +public: + using _Mybase = runtime_error; + + JobError(const std::string& Message, int ReturnCode) : _Mybase(Message), m_ReturnCode(ReturnCode) {} + + const int m_ReturnCode = 0; +}; + class JobQueue { public: @@ -73,6 +83,7 @@ public: std::chrono::system_clock::time_point StartTime; std::chrono::system_clock::time_point EndTime; int WorkerThreadId; + int ReturnCode; }; // Will only respond once when status is Complete or Aborted -- cgit v1.2.3