Liste für ignorierte Etiketten erstellt und zu den Diensten hinzugefügt.

This commit is contained in:
Developer 02
2024-07-16 13:55:36 +02:00
parent 8eefd94569
commit 8bd7ab13d0
7 changed files with 17 additions and 14 deletions

View File

@@ -6,4 +6,6 @@ Public Class Config
Public Property Debug As Boolean = False
Public Property IntervalInMin As Integer = 1
Public Property IgnoredLabels As List(Of String) = New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort"}
End Class

View File

@@ -11,13 +11,15 @@ Public Class Scheduler
Private Scheduler As IScheduler
Private ReadOnly ConnectionString As String
Private ReadOnly LicenseKey As String
Private Property _ignoredLabels As List(Of String)
Private Const JobName = "CertificateDocumentJob"
Public Sub New(pLogConfig As LogConfig, pConnectionString As String, pLicenseKey As String)
Public Sub New(pLogConfig As LogConfig, pConnectionString As String, pLicenseKey As String, ignoredLabels As List(Of String))
MyBase.New(pLogConfig)
ConnectionString = pConnectionString
LicenseKey = pLicenseKey
_ignoredLabels = ignoredLabels
Dim oLogProvider = New LogProvider(Logger)
Logging.LogProvider.SetCurrentLogProvider(oLogProvider)
@@ -36,7 +38,8 @@ Public Class Scheduler
Dim oJobData = New JobDataMap() From {
{Common.Constants.GDPICTURE, LicenseKey},
{Common.Constants.LOGCONFIG, LogConfig},
{Common.Constants.DATABASE, ConnectionString}
{Common.Constants.DATABASE, ConnectionString},
{Common.Constants.IGNORED_LABELS, _ignoredLabels}
}
Logger.Debug("Initialized Job [{0}]", JobName)

View File

@@ -59,7 +59,7 @@ Public Class Service
Logger.Debug("Inititalize Quartz")
Scheduler = New Scheduler(LogConfig, Config.ConnectionString, oKey)
Scheduler = New Scheduler(LogConfig, Config.ConnectionString, oKey, Config.IgnoredLabels)
Await Scheduler.Start(Config.IntervalInMin)
Logger.Info("Started [{0}] !", ServiceName)