work on jobrunner
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
Public Class ADSyncArgs
|
||||
Inherits JobArgs
|
||||
|
||||
Public RootPath As String
|
||||
End Class
|
||||
|
||||
@@ -1,9 +1,32 @@
|
||||
Imports DigitalData.Modules.Jobs
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Interfaces
|
||||
Imports DigitalData.Modules.Jobs
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class ADSyncJob
|
||||
Inherits JobBase
|
||||
Implements IJob(Of ADSyncArgs)
|
||||
|
||||
Private _ADSync As ActiveDirectoryInterface
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, Firebird As Firebird)
|
||||
MyBase.New(LogConfig, Firebird)
|
||||
End Sub
|
||||
|
||||
Public Sub Start(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).Start
|
||||
_ADSync = New ActiveDirectoryInterface(_LogConfig, _Firebird, Arguments.RootPath)
|
||||
|
||||
'TODO: Do AD Sync!
|
||||
|
||||
If _ADSync.Authenticate() = False Then
|
||||
_Logger.Warn("Job could not be completed! Authentication failed!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function ShouldStart(Arguments As ADSyncArgs) As Boolean Implements IJob(Of ADSyncArgs).ShouldStart
|
||||
Return Arguments.Enabled
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user