mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 11:58:19 +02:00
Add endpoint to return worker keys
This commit is contained in:
@@ -23,6 +23,17 @@ public class WorkerController() : Controller
|
|||||||
return Ok(Tranga.GetRunningWorkers().ToArray());
|
return Ok(Tranga.GetRunningWorkers().ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns all <see cref="BaseWorker"/>.Keys
|
||||||
|
/// </summary>
|
||||||
|
/// <response code="200"></response>
|
||||||
|
[HttpGet("Keys")]
|
||||||
|
[ProducesResponseType<string[]>(Status200OK, "application/json")]
|
||||||
|
public IActionResult GetWorkerIds()
|
||||||
|
{
|
||||||
|
return Ok(Tranga.GetRunningWorkers().Select(w => w.Key).ToArray());
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get all <see cref="BaseWorker"/> in requested <see cref="WorkerExecutionState"/>
|
/// Get all <see cref="BaseWorker"/> in requested <see cref="WorkerExecutionState"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Reference in New Issue
Block a user