07-12-2022
This commit is contained in:
@@ -10,17 +10,24 @@ Namespace Scheduler.Jobs
|
||||
Friend Database As MSSQLServer
|
||||
Friend State As State
|
||||
|
||||
Friend Id As Integer
|
||||
Friend Name As String
|
||||
|
||||
Private ctx As IJobExecutionContext
|
||||
|
||||
Public Function InitializeJob(context As IJobExecutionContext) As Dictionary(Of String, String)
|
||||
ctx = context
|
||||
|
||||
Dim oJobData = context.MergedJobDataMap
|
||||
Dim oArgs As Dictionary(Of String, String) = oJobData.Item(Constants.Scheduler.JOB_CONFIG_ARGUMENTS)
|
||||
LogConfig = oJobData.Item(Constants.Scheduler.JOB_CONFIG_LOGCONFIG)
|
||||
Database = oJobData.Item(Constants.Scheduler.JOB_CONFIG_DATABASE)
|
||||
State = oJobData.Item(Constants.Scheduler.JOB_CONFIG_STATE)
|
||||
Logger = LogConfig.GetLogger()
|
||||
|
||||
Id = Integer.Parse(oArgs.Item("Id"))
|
||||
Name = oArgs.Item("Name")
|
||||
|
||||
State.JobStatus.Start(ctx)
|
||||
Return oJobData.Item(Constants.Scheduler.JOB_CONFIG_ARGUMENTS)
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user