35 lines
946 B
VB.net
35 lines
946 B
VB.net
Imports System.Collections.Generic
|
|
Imports System.Data
|
|
Imports DigitalData.Modules.Database
|
|
Imports DigitalData.Modules.Interfaces
|
|
Imports DigitalData.Modules.Logging
|
|
|
|
Public Class DEX_API
|
|
Inherits JobBase
|
|
Implements IJob(Of ADSyncArgs)
|
|
|
|
Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer)
|
|
MyBase.New(LogConfig, MSSQL)
|
|
End Sub
|
|
|
|
Public Sub StartDex_API(Arguments As ADSyncArgs) Implements IJob(Of ADSyncArgs).Start
|
|
Dim oJobName As String = [GetType]().Name
|
|
|
|
Try
|
|
_Logger.Info("Running job {0}", oJobName)
|
|
|
|
|
|
_Logger.Info("Job {0} completed!", oJobName)
|
|
Catch ex As Exception
|
|
_Logger.Warn("Job {0} failed!", oJobName)
|
|
_Logger.Error(ex)
|
|
End Try
|
|
End Sub
|
|
|
|
|
|
|
|
Public Function ShouldStart(Arguments As ADSyncArgs) As Boolean Implements IJob(Of ADSyncArgs).ShouldStart
|
|
Return Arguments.Enabled
|
|
End Function
|
|
End Class
|