1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#pragma once
#include <nlohmann/json.hpp>
namespace job
{
// clang-format off
enum class JobState{
Invalid,
New,
Starting,
Running,
Suspended,
Interrupted,
Pending,
Stopping,
Completed,
Cancelled,
Exception,
Service,
UserIntervention,
Continue,
};
NLOHMANN_JSON_SERIALIZE_ENUM(JobState, {
{JobState::Invalid, "Invalid"},
{JobState::New, "New"},
{JobState::Starting, "Starting"},
{JobState::Running, "Running"},
{JobState::Suspended, "Suspended"},
{JobState::Interrupted, "Interrupted"},
{JobState::Pending, "Pending"},
{JobState::Stopping, "Stopping"},
{JobState::Completed, "Completed"},
{JobState::Cancelled, "Cancelled"},
{JobState::Exception, "Exception"},
{JobState::Service, "Service"},
{JobState::UserIntervention, "UserIntervention"},
{JobState::Continue, "Continue"},
});
}
// clang-format on
|