aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/admin/admin.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-01-22 13:21:55 +0100
committerGitHub <[email protected]>2024-01-22 13:21:55 +0100
commitcccb2d71885d1211b3eb2fc9531826457846b014 (patch)
tree9424b687d76bf937304ce14aaeef9308a31e02c2 /src/zenserver/admin/admin.cpp
parentmake sure to advance read buffer pointer in BasicFileWriter::Write (#633) (diff)
downloadzen-cccb2d71885d1211b3eb2fc9531826457846b014.tar.xz
zen-cccb2d71885d1211b3eb2fc9531826457846b014.zip
jobqueue - allow multiple threads to report progress/messages (#635)
jobqueue - add AbortReason and properly propagate error when running async command
Diffstat (limited to 'src/zenserver/admin/admin.cpp')
-rw-r--r--src/zenserver/admin/admin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zenserver/admin/admin.cpp b/src/zenserver/admin/admin.cpp
index 8b3f5a785..8093a0735 100644
--- a/src/zenserver/admin/admin.cpp
+++ b/src/zenserver/admin/admin.cpp
@@ -171,6 +171,10 @@ HttpAdminService::HttpAdminService(GcScheduler& Scheduler,
}
Obj.EndArray();
}
+ if (!State.AbortReason.empty())
+ {
+ Obj.AddString("AbortReason"sv, State.AbortReason);
+ }
};
auto GetAgeAsSeconds = [](std::chrono::system_clock::time_point Start, std::chrono::system_clock::time_point End) {
@@ -210,6 +214,7 @@ HttpAdminService::HttpAdminService(GcScheduler& Scheduler,
CbObjectWriter Obj;
Obj.AddString("Name"sv, CurrentState->Name);
Obj.AddString("Status"sv, "Aborted"sv);
+
WriteState(Obj, CurrentState->State);
Obj.AddFloat("QueueTimeS", GetAgeAsSeconds(CurrentState->CreateTime, CurrentState->StartTime));
Obj.AddFloat("RunTimeS", GetAgeAsSeconds(CurrentState->StartTime, CurrentState->EndTime));