This commit is contained in:
@@ -720,8 +720,11 @@ namespace AyaNova.Biz
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "GenerateBeforeInterval", await Translate("ErrorGenBeforeTooSmall"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
var tsRepeatInterval = dtRepeat - dtNow;
|
||||
if (tsRepeatInterval.TotalSeconds < 3601)//One hour minimum repeat interval
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "RepeatInterval", await Translate("ErrorRepeatIntervalTooSmall"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5220,16 +5223,17 @@ namespace AyaNova.Biz
|
||||
//
|
||||
internal static async Task GenerateAsync(AyContext ct, ILogger log)
|
||||
{
|
||||
#if (DEBUG)
|
||||
log.LogInformation("PMBiz - Generating");
|
||||
#endif
|
||||
// #if (DEBUG)
|
||||
// log.LogInformation("PMBiz - Generating");
|
||||
// #endif
|
||||
//Get a list of PM id's ready for conversion now
|
||||
var l = await ct.PM.AsNoTracking()
|
||||
.Where(z => z.GenerateDate < DateTime.UtcNow && (z.StopGeneratingDate == null || z.StopGeneratingDate > DateTime.UtcNow) && z.Active == true)
|
||||
.Select(z => z.Id)
|
||||
.ToListAsync();
|
||||
#if (DEBUG)
|
||||
log.LogInformation($"PMBiz - Found {l.Count} ready to generate PM items");
|
||||
if (l.Count > 0)
|
||||
log.LogInformation($"PMBiz - Found {l.Count} ready to generate PM items");
|
||||
#endif
|
||||
|
||||
//process those items
|
||||
|
||||
Reference in New Issue
Block a user