-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1231 from solliancenet/cp_polling_work
Polling: Add LongRunning flag on agent and OperationState class and OperationStatus enum
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace FoundationaLLM.Common.Models.Orchestration | ||
{ | ||
/// <summary> | ||
/// Represents the current state of a long running operation. | ||
/// </summary> | ||
public class OperationState | ||
{ | ||
/// <summary> | ||
/// The identifier of the long running operation. | ||
/// </summary> | ||
public required string OperationId { get; set; } | ||
|
||
/// <summary> | ||
/// The status of the long running operation. | ||
/// </summary> | ||
public required OperationStatus Status { get; set; } | ||
|
||
/// <summary> | ||
/// The message describing the current state of the operation. | ||
/// </summary> | ||
public string? Message { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace FoundationaLLM.Common.Models.Orchestration | ||
{ | ||
/// <summary> | ||
/// Represents the status of a long running operation. | ||
/// </summary> | ||
public enum OperationStatus | ||
{ | ||
/// <summary> | ||
/// Operation is new and Pending processing. | ||
/// </summary> | ||
Pending, | ||
|
||
/// <summary> | ||
/// Operation is in progress. | ||
/// </summary> | ||
InProgress, | ||
|
||
/// <summary> | ||
/// Operation has been completed. | ||
/// </summary> | ||
Completed, | ||
|
||
/// <summary> | ||
/// Operation has completed in a failed state | ||
/// </summary> | ||
Failed | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters