mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 03:48:19 +02:00
Add endpoint to return worker keys
This commit is contained in:
@@ -22,6 +22,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"/>
|
||||||
|
Reference in New Issue
Block a user