mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-13 14:57:53 +02:00
Add GET /v2/Jobs/Standby
This commit is contained in:
@ -39,6 +39,7 @@ public partial class Server : GlobalBase, IDisposable
|
||||
new ("GET", @"/v2/Jobs/Running", GetV2JobsRunning),
|
||||
new ("GET", @"/v2/Jobs/Waiting", GetV2JobsWaiting),
|
||||
new ("GET", @"/v2/Jobs/Monitoring", GetV2JobsMonitoring),
|
||||
new ("GET", @"/v2/Jobs/Standby", GetV2JobsStandby),
|
||||
new ("GET", @"/v2/Job/Types", GetV2JobTypes),
|
||||
new ("POST", @"/v2/Job/Create/([a-zA-Z]+)", PostV2JobCreateType),
|
||||
new ("GET", @"/v2/Job", GetV2Job),
|
||||
|
@ -26,6 +26,13 @@ public partial class Server
|
||||
.Select(job => job.id));
|
||||
}
|
||||
|
||||
private ValueTuple<HttpStatusCode, object?> GetV2JobsStandby(GroupCollection groups, Dictionary<string, string> requestParameters)
|
||||
{
|
||||
return new ValueTuple<HttpStatusCode, object?>(HttpStatusCode.OK, _parent.jobBoss.jobs
|
||||
.Where(job => job.progressToken.state is ProgressToken.State.Standby)
|
||||
.Select(job => job.id));
|
||||
}
|
||||
|
||||
private ValueTuple<HttpStatusCode, object?> GetV2JobsMonitoring(GroupCollection groups, Dictionary<string, string> requestParameters)
|
||||
{
|
||||
return new ValueTuple<HttpStatusCode, object?>(HttpStatusCode.OK, _parent.jobBoss.jobs
|
||||
|
Reference in New Issue
Block a user