Neue Features, Optimierungen und Bugfixes
- Neues Projekt `EDMI.API` zur Solution hinzugefügt. - `App.config`: Abhängigkeiten und `bindingRedirect` aktualisiert. - Verbesserte Thread-Sicherheit mit `ReaderWriterLockSlim`. - SQL-Abfragen mit `WITH (NOLOCK)` für bessere Parallelität. - Robuste Verarbeitung von `DataRow`-Werten mit `IIf(IsDBNull(...))`. - Neue Sicherheitsprüfung für `JobListener` initialisiert. - `SaveDataTables` optimiert, Performance-Warnungen hinzugefügt. - Versionsnummer auf `2.5.0.0` aktualisiert, Copyright auf 2026. - Paket `NLog` aus `packages.config` entfernt.
This commit is contained in:
@@ -13,20 +13,25 @@ Public Class Scheduler
|
||||
Private ReadOnly _MSSQL As MSSQLServer
|
||||
Private _Scheduler As IScheduler
|
||||
Private ReadOnly _JobListener As JobListener
|
||||
Private ReadOnly _GlobalState As GlobalState ' ✅ NEU
|
||||
|
||||
Private ReadOnly _Props = New NameValueCollection From {
|
||||
{"quartz.serializer.type", "binary"},
|
||||
{"quartz.threadPool.maxConcurrency", 1}
|
||||
{"quartz.threadPool.maxConcurrency", 3}
|
||||
}
|
||||
|
||||
Private Const JOB_GROUP As String = "DatatableJobs"
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pMSSQL_Config As MSSQLServer, pTableStore As DataSet)
|
||||
Public Sub New(pLogConfig As LogConfig, pMSSQL_Config As MSSQLServer, pTableStore As DataSet, pGlobalState As GlobalState)
|
||||
MyBase.New(pLogConfig)
|
||||
|
||||
_Factory = New StdSchedulerFactory(_Props)
|
||||
_MSSQL = pMSSQL_Config
|
||||
_JobListener = New JobListener(pLogConfig, _MSSQL, pTableStore)
|
||||
_GlobalState = pGlobalState
|
||||
|
||||
_GlobalState.JobListener = _JobListener
|
||||
Logger.Debug("JobListener registered in GlobalState")
|
||||
|
||||
Logging.LogProvider.SetCurrentLogProvider(New LogProvider(Logger))
|
||||
End Sub
|
||||
@@ -108,7 +113,7 @@ Public Class Scheduler
|
||||
End Sub
|
||||
Public Async Function GetCronJobs() As Task(Of DataTable)
|
||||
Try
|
||||
Dim oSQL As String = "SELECT * FROM TBAPPSERV_CRON_JOB WHERE ACTIVE = 1"
|
||||
Dim oSQL As String = "SELECT * FROM TBAPPSERV_CRON_JOB WITH (NOLOCK) WHERE ACTIVE = 1"
|
||||
Dim oDatatable As DataTable = Await _MSSQL.GetDatatableAsync(oSQL)
|
||||
|
||||
Return oDatatable
|
||||
@@ -119,7 +124,7 @@ Public Class Scheduler
|
||||
|
||||
Public Async Function GetCronJobDetails(CronJobId As Integer) As Task(Of DataTable)
|
||||
Try
|
||||
Dim oSQL As String = $"SELECT * FROM TBAPPSERV_CRON_DETAIL WHERE CRON_ID = {CronJobId}"
|
||||
Dim oSQL As String = $"SELECT * FROM TBAPPSERV_CRON_DETAIL WITH (NOLOCK) WHERE CRON_ID = {CronJobId}"
|
||||
Dim oDatatable As DataTable = Await _MSSQL.GetDatatableAsync(oSQL)
|
||||
|
||||
Return oDatatable
|
||||
|
||||
Reference in New Issue
Block a user