work on jobrunner

This commit is contained in:
Jonathan Jenne
2019-04-10 11:43:15 +02:00
parent 720618f29b
commit 2855cc6208
14 changed files with 103 additions and 54 deletions

View File

@@ -60,8 +60,17 @@ Public Class JobRunner
_logger.Debug("Background worker running..")
' TODO: WORK
'Dim job As New ImportZUGFeRDFiles(_logConfig, _firebird)
'job.Start(args)
Dim oJob As New ADSyncJob(_logConfig, _firebird)
Dim oArgs As New ADSyncArgs() With {
.Enabled = My.Settings.JOB_ADSYNC_ENABLED,
.Interval = My.Settings.JOB_ADSYNC_INTERVAL,
.RootPath = My.Settings.JOB_ADSYNC_ROOT_PATH
}
If oJob.ShouldStart(oArgs) Then
oJob.Start(oArgs)
End If
Catch ex As Exception
_logger.Warn("Background worker failed!")
_logger.Error(ex)