Liste für ignorierte Etiketten erstellt und zu den Diensten hinzugefügt.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user