This commit is contained in:
@@ -197,17 +197,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||||
|
|
||||||
//return if no free slot
|
//return if no free slot
|
||||||
//Note that this *should* normally return a 503 however we're pretty tightly wired into that meaning the server is closed at the client end which
|
//Note that this *should* normally return a 503 however this is not an unexpected result and we're pretty tightly wired into that meaning the server is closed at the client end which
|
||||||
//handles it at a lower level
|
//handles it at a lower api level
|
||||||
//returning an OK method here allows the client to handle it at the level of the report dialog rather than the api handler which will short circuit if it was a 503
|
//returning an OK method here allows the client to handle it at the level of the report dialog rather than the api handler which will short circuit if it was a 503
|
||||||
|
|
||||||
#if (DEBUG)
|
|
||||||
//50% chance of timeout
|
|
||||||
// var random = new Random();
|
|
||||||
// if (random.Next(10) < 5)
|
|
||||||
//return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_SERVER_ERROR, null, "busy"));
|
|
||||||
return Ok(ApiOkResponse.Response(new { busy = true, retryms = ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT }));
|
|
||||||
#endif
|
|
||||||
if (!Util.ReportRenderManager.RenderSlotAvailable(log))
|
if (!Util.ReportRenderManager.RenderSlotAvailable(log))
|
||||||
return Ok(ApiOkResponse.Response(new { busy = true, retryms = ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT }));
|
return Ok(ApiOkResponse.Response(new { busy = true, retryms = ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT }));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user