Files
Modules/Jobs/DEX_API/API_DEXSQLJob.vb
Developer01 0e31f5c8e3 Rename
2026-07-07 17:00:11 +02:00

36 lines
994 B
VB.net

Imports System.Collections.Generic
Imports System.Data
Imports System.Threading.Tasks
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Interfaces
Imports DigitalData.Modules.Logging
Public Class API_DEXSQLJob
Inherits JobBase
Implements IJob(Of APISQLArgs)
Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer)
MyBase.New(LogConfig, MSSQL)
End Sub
Public Sub StartDexAPISQL(Arguments As APISQLArgs) Implements IJob(Of APISQLArgs).StartDexAPISQL
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 APISQLArgs) As Boolean Implements IJob(Of APISQLArgs).ShouldStart
Return Arguments.Enabled
End Function
End Class