-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
259 additions
and
145 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
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
35 changes: 1 addition & 34 deletions
35
src/Machine/src/Serval.Machine.Shared/Services/IBuildJobService.cs
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 |
---|---|---|
@@ -1,43 +1,10 @@ | ||
namespace Serval.Machine.Shared.Services; | ||
|
||
public interface IBuildJobService<TEngine> | ||
public interface IBuildJobService<TEngine> : IBuildJobServiceBase | ||
where TEngine : ITrainingEngine | ||
{ | ||
Task<IReadOnlyList<TEngine>> GetBuildingEnginesAsync( | ||
BuildJobRunnerType runner, | ||
CancellationToken cancellationToken = default | ||
); | ||
|
||
Task<bool> IsEngineBuilding(string engineId, CancellationToken cancellationToken = default); | ||
|
||
Task CreateEngineAsync(string engineId, string? name = null, CancellationToken cancellationToken = default); | ||
|
||
Task DeleteEngineAsync(string engineId, CancellationToken cancellationToken = default); | ||
|
||
Task<bool> StartBuildJobAsync( | ||
BuildJobRunnerType runnerType, | ||
EngineType engineType, | ||
string engineId, | ||
string buildId, | ||
BuildStage stage, | ||
object? data = default, | ||
string? buildOptions = default, | ||
CancellationToken cancellationToken = default | ||
); | ||
|
||
Task<(string? BuildId, BuildJobState State)> CancelBuildJobAsync( | ||
string engineId, | ||
CancellationToken cancellationToken = default | ||
); | ||
|
||
Task<bool> BuildJobStartedAsync(string engineId, string buildId, CancellationToken cancellationToken = default); | ||
|
||
Task BuildJobFinishedAsync( | ||
string engineId, | ||
string buildId, | ||
bool buildComplete, | ||
CancellationToken cancellationToken = default | ||
); | ||
|
||
Task BuildJobRestartingAsync(string engineId, string buildId, CancellationToken cancellationToken = default); | ||
} |
37 changes: 37 additions & 0 deletions
37
src/Machine/src/Serval.Machine.Shared/Services/IBuildJobServiceBase.cs
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,37 @@ | ||
namespace Serval.Machine.Shared.Services; | ||
|
||
public interface IBuildJobServiceBase | ||
{ | ||
Task<bool> IsEngineBuilding(string engineId, CancellationToken cancellationToken = default); | ||
|
||
Task CreateEngineAsync(string engineId, string? name = null, CancellationToken cancellationToken = default); | ||
|
||
Task DeleteEngineAsync(string engineId, CancellationToken cancellationToken = default); | ||
|
||
Task<bool> StartBuildJobAsync( | ||
BuildJobRunnerType runnerType, | ||
EngineType engineType, | ||
string engineId, | ||
string buildId, | ||
BuildStage stage, | ||
object? data = default, | ||
string? buildOptions = default, | ||
CancellationToken cancellationToken = default | ||
); | ||
|
||
Task<(string? BuildId, BuildJobState State)> CancelBuildJobAsync( | ||
string engineId, | ||
CancellationToken cancellationToken = default | ||
); | ||
|
||
Task<bool> BuildJobStartedAsync(string engineId, string buildId, CancellationToken cancellationToken = default); | ||
|
||
Task BuildJobFinishedAsync( | ||
string engineId, | ||
string buildId, | ||
bool buildComplete, | ||
CancellationToken cancellationToken = default | ||
); | ||
|
||
Task BuildJobRestartingAsync(string engineId, string buildId, CancellationToken cancellationToken = default); | ||
} |
Oops, something went wrong.