Added delay in batch job processing
This commit is contained in:
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -121,9 +121,9 @@
|
|||||||
"AYANOVA_USE_URLS": "http://*:7575;",
|
"AYANOVA_USE_URLS": "http://*:7575;",
|
||||||
//"AYANOVA_PERMANENTLY_ERASE_DATABASE":"true",
|
//"AYANOVA_PERMANENTLY_ERASE_DATABASE":"true",
|
||||||
//"AYANOVA_REMOVE_LICENSE_FROM_DB":"true",
|
//"AYANOVA_REMOVE_LICENSE_FROM_DB":"true",
|
||||||
//"AYANOVA_SERVER_TEST_MODE": "true",
|
// "AYANOVA_SERVER_TEST_MODE": "true",
|
||||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-8",
|
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-8",
|
||||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "large",
|
||||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin"
|
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin"
|
||||||
},
|
},
|
||||||
"sourceFileMap": {
|
"sourceFileMap": {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# now
|
# now
|
||||||
|
|
||||||
|
todo: what the hell is morrow doing? CPU pegged at 100% for all night now
|
||||||
|
could it be retagging or bulk op of some kind with huge wo dataset?
|
||||||
|
|
||||||
todo: stop sending renewal reminders, shareit does that for us no need to make more work
|
todo: stop sending renewal reminders, shareit does that for us no need to make more work
|
||||||
look into v7 license key messages and make sure it doesn't say that, also take out any info about manual license install
|
look into v7 license key messages and make sure it doesn't say that, also take out any info about manual license install
|
||||||
@@ -17,7 +18,7 @@ PRICING / COSTS
|
|||||||
Done!
|
Done!
|
||||||
|
|
||||||
License agreement page for subscription vs perpetual
|
License agreement page for subscription vs perpetual
|
||||||
("Quickly, quickly, there's no time" maybe can shoehorn it into the existing agreement by including "service" or subscription wording and just bypass all the rest for now until can pay a lawyer to do it)
|
("Quickly, quickly, there's no time" must use a new format as this is a subscription "SERVICE" not a software product so maybe look at quickbooks license or service agreement I guess it would be called)
|
||||||
Must be clear customer is responsible for their data and must remain within reasonable usage levels or we will cancel the service
|
Must be clear customer is responsible for their data and must remain within reasonable usage levels or we will cancel the service
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#define AYSHOWQUERYINFO
|
//#define AYSHOWQUERYINFO
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -14,7 +14,13 @@ namespace AyaNova.DataList
|
|||||||
internal static class DataListFetcher
|
internal static class DataListFetcher
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#if (AYSHOWQUERYINFO)
|
||||||
|
#if (DEBUG)
|
||||||
|
#warning FYI AYSHOWQUERYINFO is defined
|
||||||
|
#else
|
||||||
|
#error ### HOLDUP: AYSHOWQUERYINFO is defined in a RELEASE BUILD!!!!
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
// Get the data list data requested
|
// Get the data list data requested
|
||||||
//
|
//
|
||||||
@@ -59,6 +65,7 @@ namespace AyaNova.DataList
|
|||||||
System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch();
|
System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//QUERY THE DB
|
//QUERY THE DB
|
||||||
using (var command = ct.Database.GetDbConnection().CreateCommand())
|
using (var command = ct.Database.GetDbConnection().CreateCommand())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -656,6 +656,9 @@ MULTIPLE discount / markup ITEMS
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -635,6 +635,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -434,6 +434,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -536,6 +536,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -451,6 +451,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -436,6 +436,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1034,6 +1034,10 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -593,6 +593,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -756,6 +756,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -462,6 +462,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -484,6 +484,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -987,6 +987,10 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1038,6 +1038,10 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -425,6 +425,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -503,6 +503,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -487,6 +487,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -487,6 +487,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -473,6 +473,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -482,6 +482,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -683,6 +683,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -482,6 +482,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1296,6 +1296,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -500,6 +500,9 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1257,6 +1257,10 @@ namespace AyaNova.Biz
|
|||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TEMPORARY MEASURE AWAITING BETTER SOLUTION AND CANCELLABLE EXTENSION JOBS
|
||||||
|
//delay so we're not tying up all the resources in a tight loop
|
||||||
|
await Task.Delay(AyaNova.Util.ServerBootConfig.JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,15 @@ namespace AyaNova.KPI
|
|||||||
{
|
{
|
||||||
internal static class KPIFetcher
|
internal static class KPIFetcher
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#if (AYSHOWKPIQUERYINFO)
|
||||||
|
#if (DEBUG)
|
||||||
|
#warning FYI AYSHOWKPIQUERYINFO is defined
|
||||||
|
#else
|
||||||
|
#error ### HOLDUP: AYSHOWKPIQUERYINFO is defined in a RELEASE BUILD!!!!
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
// Get the kpi data requested
|
// Get the kpi data requested
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ namespace AyaNova.Util
|
|||||||
//############################################################################################################
|
//############################################################################################################
|
||||||
//STATIC HARD CODED COMPILE TIME DEFAULTS NOT SET THROUGH CONFIG
|
//STATIC HARD CODED COMPILE TIME DEFAULTS NOT SET THROUGH CONFIG
|
||||||
internal const int FAILED_AUTH_DELAY = 3000;//ms
|
internal const int FAILED_AUTH_DELAY = 3000;//ms
|
||||||
|
internal const int JOB_OBJECT_HANDLE_BATCH_JOB_LOOP_DELAY = 75;//ms this delay ensures super big time consuming batch jobs don't use all server CPU resources
|
||||||
|
|
||||||
|
|
||||||
//UPLOAD LIMITS 1048576 = 1MiB for testing 10737420000 10737418240 10,737,418,240
|
//UPLOAD LIMITS 1048576 = 1MiB for testing 10737420000 10737418240 10,737,418,240
|
||||||
internal const long MAX_ATTACHMENT_UPLOAD_BYTES = 10737420000;//slight bit of overage as 10737418241=10GiB
|
internal const long MAX_ATTACHMENT_UPLOAD_BYTES = 10737420000;//slight bit of overage as 10737418241=10GiB
|
||||||
|
|||||||
Reference in New Issue
Block a user