This commit is contained in:
@@ -207,8 +207,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (!serverState.IsOpen)
|
if (!serverState.IsOpen)
|
||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||||
|
|
||||||
//check for an kill any expired prior renders stuck around
|
//this is done by a recurring JOB now so no longer needed here
|
||||||
Util.ReportRenderManager.KillExpiredRenders(log);
|
// //check for an kill any expired prior renders stuck around
|
||||||
|
// Util.ReportRenderManager.KillExpiredRenders(log);
|
||||||
|
|
||||||
ReportBiz biz = ReportBiz.GetBiz(ct, HttpContext);
|
ReportBiz biz = ReportBiz.GetBiz(ct, HttpContext);
|
||||||
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
||||||
@@ -229,7 +230,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
catch (ReportRenderTimeOutException)
|
catch (ReportRenderTimeOutException)
|
||||||
{
|
{
|
||||||
log.LogInformation($"Report render timeout report id: {reportRequest.ReportId}, record count:{reportRequest.SelectedRowIds.LongLength}, user:{UserNameFromContext.Name(HttpContext.Items)} ");
|
log.LogInformation($"Report render timeout report id: {reportRequest.ReportId}, record count:{reportRequest.SelectedRowIds.LongLength}, user:{UserNameFromContext.Name(HttpContext.Items)} ");
|
||||||
return Ok(ApiOkResponse.Response(new { timeout = true, timeoutconfig = ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT }));
|
return Ok(ApiOkResponse.Response(new { timeout = true, timeoutconfigminutes = ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT }));
|
||||||
}
|
}
|
||||||
catch (System.Exception ex)
|
catch (System.Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -230,10 +230,15 @@ namespace AyaNova.Biz
|
|||||||
await CoreJobSweeper.DoWorkAsync();
|
await CoreJobSweeper.DoWorkAsync();
|
||||||
if (!KeepOnWorking()) return;
|
if (!KeepOnWorking()) return;
|
||||||
|
|
||||||
//Clean temp folder
|
//Cleanup temp folder
|
||||||
CoreJobTempFolderCleanup.DoWork();
|
CoreJobTempFolderCleanup.DoWork();
|
||||||
if (!KeepOnWorking()) return;
|
if (!KeepOnWorking()) return;
|
||||||
|
|
||||||
|
//Check for and kill stuck report rendering engine processes
|
||||||
|
CoreJobReportRenderEngineProcessCleanup.DoWork();
|
||||||
|
if (!KeepOnWorking()) return;
|
||||||
|
|
||||||
|
|
||||||
log.LogTrace("Processing exclusive dynamic jobs");
|
log.LogTrace("Processing exclusive dynamic jobs");
|
||||||
|
|
||||||
//BIZOBJECT DYNAMIC JOBS
|
//BIZOBJECT DYNAMIC JOBS
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using AyaNova.Util;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyaNova.Biz
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// called by Generator to kill report generation processor stuck in limbo (chromium at this time)
|
||||||
|
/// </summary>
|
||||||
|
internal static class CoreJobReportRenderEngineProcessCleanup
|
||||||
|
{
|
||||||
|
private static ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("CoreJobReportRenderEngineProcessCleanup");
|
||||||
|
|
||||||
|
private static DateTime _lastRun = DateTime.UtcNow;
|
||||||
|
private static TimeSpan tsRunEvery = new TimeSpan(0, 5, 1);//every this minutes run the cleanup task
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
//
|
||||||
|
public static void DoWork()
|
||||||
|
{
|
||||||
|
if (DateUtil.IsAfterDuration(_lastRun, tsRunEvery))
|
||||||
|
{
|
||||||
|
log.LogTrace("Checking for expired processes");
|
||||||
|
Util.ReportRenderManager.KillExpiredRenders(log);
|
||||||
|
//FileUtil.CleanTemporaryFilesFolder(new TimeSpan(0,5,0));//erase any files found to be older than 5 minutes
|
||||||
|
var now = DateTime.UtcNow;
|
||||||
|
_lastRun = now;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
}//eoc
|
||||||
|
}//eons
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ namespace AyaNova.Biz
|
|||||||
private static ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("CoreJobTempFolderCleanup");
|
private static ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("CoreJobTempFolderCleanup");
|
||||||
|
|
||||||
private static DateTime _lastRun = DateTime.UtcNow;
|
private static DateTime _lastRun = DateTime.UtcNow;
|
||||||
private static TimeSpan tsRunEvery = new TimeSpan(0, 0, 1);//every this minutes run the cleanup task
|
private static TimeSpan tsRunEvery = new TimeSpan(0, 5, 2);//every this minutes run the cleanup task
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@@ -23,7 +23,7 @@ namespace AyaNova.Biz
|
|||||||
if (DateUtil.IsAfterDuration(_lastRun, tsRunEvery))
|
if (DateUtil.IsAfterDuration(_lastRun, tsRunEvery))
|
||||||
{
|
{
|
||||||
log.LogTrace("Temp cleanup now");
|
log.LogTrace("Temp cleanup now");
|
||||||
FileUtil.CleanTemporaryFilesFolder(new TimeSpan(0,5,0));//erase any files found to be older than 5 minutes
|
FileUtil.CleanTemporaryFilesFolder(new TimeSpan(0,15,0));//erase any files found to be older than 15 minutes (which coincides with max report rendering timeout)
|
||||||
var now = DateTime.UtcNow;
|
var now = DateTime.UtcNow;
|
||||||
_lastRun = now;
|
_lastRun = now;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2303,7 +2303,7 @@
|
|||||||
"LastServiceWorkOrderServiceDate": "Letztes Servicedatum",
|
"LastServiceWorkOrderServiceDate": "Letztes Servicedatum",
|
||||||
"FilterUsers": "Benutzer filtern",
|
"FilterUsers": "Benutzer filtern",
|
||||||
"UserCountExceeded": "Server wegen Überschreitung der Lizenz für aktive Servicetyp-Benutzer geschlossen",
|
"UserCountExceeded": "Server wegen Überschreitung der Lizenz für aktive Servicetyp-Benutzer geschlossen",
|
||||||
"ReportRenderAtCapacity": "Der Server hat derzeit das maximale Limit für die Verarbeitung von Berichten, bitte versuchen Sie es in Kürze erneut",
|
"ReportRenderTimeOut": "Der Server hat derzeit das maximale Limit für die Verarbeitung von Berichten, bitte versuchen Sie es in Kürze erneut",
|
||||||
"NativeDateTimeInput": "Verwenden Sie die standardmäßigen Eingabesteuerelemente für Datum und Uhrzeit des Browsers",
|
"NativeDateTimeInput": "Verwenden Sie die standardmäßigen Eingabesteuerelemente für Datum und Uhrzeit des Browsers",
|
||||||
"CompanyInformation": "Firmeninformation",
|
"CompanyInformation": "Firmeninformation",
|
||||||
"CompanyEmail": "Email",
|
"CompanyEmail": "Email",
|
||||||
|
|||||||
@@ -2303,7 +2303,7 @@
|
|||||||
"LastServiceWorkOrderServiceDate": "Last service date",
|
"LastServiceWorkOrderServiceDate": "Last service date",
|
||||||
"FilterUsers": "Filter Users",
|
"FilterUsers": "Filter Users",
|
||||||
"UserCountExceeded": "Server locked due to exceeding licensed active scheduleable User limit",
|
"UserCountExceeded": "Server locked due to exceeding licensed active scheduleable User limit",
|
||||||
"ReportRenderAtCapacity": "The server is currently at the maximum limit for processing reports, please try again shortly",
|
"ReportRenderTimeOut": "The server is currently at the maximum limit for processing reports, please try again shortly",
|
||||||
"NativeDateTimeInput": "Use browser's standard date time input controls",
|
"NativeDateTimeInput": "Use browser's standard date time input controls",
|
||||||
"CompanyInformation": "Company information",
|
"CompanyInformation": "Company information",
|
||||||
"CompanyEmail": "Email",
|
"CompanyEmail": "Email",
|
||||||
|
|||||||
@@ -2303,7 +2303,7 @@
|
|||||||
"LastServiceWorkOrderServiceDate": "Última fecha de servicio",
|
"LastServiceWorkOrderServiceDate": "Última fecha de servicio",
|
||||||
"FilterUsers": "Filtrar usuarios",
|
"FilterUsers": "Filtrar usuarios",
|
||||||
"UserCountExceeded": "Servidor cerrado debido a que se superó la licencia para los usuarios del tipo de servicio activo",
|
"UserCountExceeded": "Servidor cerrado debido a que se superó la licencia para los usuarios del tipo de servicio activo",
|
||||||
"ReportRenderAtCapacity": "El servidor se encuentra actualmente en el límite máximo para procesar informes. Vuelva a intentarlo en breve.",
|
"ReportRenderTimeOut": "El servidor se encuentra actualmente en el límite máximo para procesar informes. Vuelva a intentarlo en breve.",
|
||||||
"NativeDateTimeInput": "Utilice los controles de entrada de fecha y hora estándar del navegador",
|
"NativeDateTimeInput": "Utilice los controles de entrada de fecha y hora estándar del navegador",
|
||||||
"CompanyInformation": "Información de la empresa",
|
"CompanyInformation": "Información de la empresa",
|
||||||
"CompanyEmail": "Email",
|
"CompanyEmail": "Email",
|
||||||
|
|||||||
@@ -2303,7 +2303,7 @@
|
|||||||
"LastServiceWorkOrderServiceDate": "Dernière date de service",
|
"LastServiceWorkOrderServiceDate": "Dernière date de service",
|
||||||
"FilterUsers": "Filtrer les utilisateurs",
|
"FilterUsers": "Filtrer les utilisateurs",
|
||||||
"UserCountExceeded": "Serveur fermé en raison d'un dépassement de licence pour les utilisateurs de type de service actif",
|
"UserCountExceeded": "Serveur fermé en raison d'un dépassement de licence pour les utilisateurs de type de service actif",
|
||||||
"ReportRenderAtCapacity": "Le serveur est actuellement à la limite maximale pour le traitement des rapports, veuillez réessayer sous peu",
|
"ReportRenderTimeOut": "Le serveur est actuellement à la limite maximale pour le traitement des rapports, veuillez réessayer sous peu",
|
||||||
"NativeDateTimeInput": "Utiliser les commandes de saisie de date et d'heure standard du navigateur",
|
"NativeDateTimeInput": "Utiliser les commandes de saisie de date et d'heure standard du navigateur",
|
||||||
"CompanyInformation": "Informations sur la société",
|
"CompanyInformation": "Informations sur la société",
|
||||||
"CompanyEmail": "Email",
|
"CompanyEmail": "Email",
|
||||||
|
|||||||
Reference in New Issue
Block a user