From 5a73c886534d41c873f2e3b02b186e2514541cd7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 28 Oct 2021 20:11:34 +0000 Subject: [PATCH] --- server/AyaNova/Controllers/ReportController.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/server/AyaNova/Controllers/ReportController.cs b/server/AyaNova/Controllers/ReportController.cs index c3e68add..dd034583 100644 --- a/server/AyaNova/Controllers/ReportController.cs +++ b/server/AyaNova/Controllers/ReportController.cs @@ -197,17 +197,9 @@ namespace AyaNova.Api.Controllers return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason)); //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 - //handles it at a lower level + //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 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 - -#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)) return Ok(ApiOkResponse.Response(new { busy = true, retryms = ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT }));