09-12-2022
This commit is contained in:
@@ -4,6 +4,7 @@ Imports ECM.JobRunner.Windows.UpdateJob
|
||||
Imports ECM.JobRunner.Windows.UpdateProfile
|
||||
Imports ECM.JobRunner.Windows.GetJobStatus
|
||||
Imports ECM.JobRunner.Windows.GetJobConfig
|
||||
Imports ECM.JobRunner.Windows.RunJob
|
||||
|
||||
Namespace WCF
|
||||
<ServiceContract(Name:="IEDMIService", [Namespace]:="http://DigitalData.Services.EDMIService")>
|
||||
@@ -15,6 +16,9 @@ Namespace WCF
|
||||
<OperationContract>
|
||||
Function GetJobStatus() As GetJobStatusResponse
|
||||
|
||||
'TODO: implement
|
||||
Function RunJob() As RunJobResponse
|
||||
|
||||
<OperationContract>
|
||||
Function UpdateJob(pData As UpdateJobRequest) As UpdateJobResponse
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Messaging.WCF
|
||||
Imports ECM.JobRunner.Windows.Scheduler
|
||||
Imports FxResources.System
|
||||
|
||||
Namespace WCF
|
||||
|
||||
@@ -55,6 +56,11 @@ Namespace WCF
|
||||
Dim oMethod As New UpdateProfile.UpdateProfileMethod(LogConfig, Database, State, Scheduler)
|
||||
Return oMethod.Run(pData)
|
||||
End Function
|
||||
|
||||
Public Function RunJob() As RunJob.RunJobResponse Implements IJobRunner.RunJob
|
||||
'Dim oMethod As New RunJob.RunJobMethod(LogConfig, Database, State, Scheduler)
|
||||
'Return oMethod.Run(pData)
|
||||
End Function
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
31
ECM.JobRunner.Windows/WCF/Methods/RunJob.vb
Normal file
31
ECM.JobRunner.Windows/WCF/Methods/RunJob.vb
Normal file
@@ -0,0 +1,31 @@
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports ECM.JobRunner.Windows.Scheduler
|
||||
Imports System.Runtime.Serialization
|
||||
|
||||
Public Class RunJob
|
||||
Public Class RunJobMethod
|
||||
Inherits Base.BaseMethod
|
||||
|
||||
Private ReadOnly Scheduler As JobScheduler
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pState As State, pScheduler As JobScheduler)
|
||||
MyBase.New(pLogConfig, pDatabase, pState)
|
||||
Scheduler = pScheduler
|
||||
End Sub
|
||||
|
||||
Public Async Function Run(pData As RunJobRequest) As Task(Of RunJobResponse)
|
||||
Await Scheduler.ScheduleJob(pData.JobId)
|
||||
Return New RunJobResponse()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class RunJobRequest
|
||||
Public Property JobId As Integer
|
||||
End Class
|
||||
|
||||
Public Class RunJobResponse
|
||||
Inherits Base.BaseResponse
|
||||
End Class
|
||||
End Class
|
||||
Reference in New Issue
Block a user