aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-08-12 13:53:58 +0200
committerGitHub Enterprise <[email protected]>2025-08-12 13:53:58 +0200
commit3a9bc3071b9a9452a5aef23c438233fc9e86fb47 (patch)
treeb0a1d67fe765f2ddc96772db088d781be159d627 /src/zencore/include
parentadd filtering to builds download (#463) (diff)
downloadzen-3a9bc3071b9a9452a5aef23c438233fc9e86fb47.tar.xz
zen-3a9bc3071b9a9452a5aef23c438233fc9e86fb47.zip
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
Diffstat (limited to 'src/zencore/include')
-rw-r--r--src/zencore/include/zencore/jobqueue.h11
1 files changed, 11 insertions, 0 deletions
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