Revision 8c460847
Added by François ARMAND over 6 years ago
inventory-provisioning-web/src/main/scala/com/normation/inventory/provisioning/endpoint/FusionReportEndpoint.scala | ||
---|---|---|
def queueInfo() = {
|
||
// get the current size, the remaining of the answer is based on that
|
||
val current = queueSize.get
|
||
val saturated = (current+1) >= maxQueueSize
|
||
//must be coherent with can do, current = 49 < max = 50 => not saturated
|
||
val saturated = current >= maxQueueSize
|
||
val code = if(saturated) HttpStatus.TOO_MANY_REQUESTS else HttpStatus.OK
|
||
val json = s"""{"queueMaxSize":$maxQueueSize, "queueFillCount":$current, "queueSaturated":$saturated}"""
|
||
val headers = new HttpHeaders()
|
Also available in: Unified diff
Fixes #11330: Inventory endpoint info api is reporting saturated off by one