Common und Service API Send API Mails
This commit is contained in:
@@ -10,7 +10,8 @@ Public Class Service
|
||||
Private Config As Config
|
||||
Private Database As MSSQLServer
|
||||
Private TempFiles As TempFiles
|
||||
Private Scheduler As Scheduler
|
||||
Private Scheduler1 As Scheduler_FinishEnvelope
|
||||
Private Scheduler2 As Scheduler_API_SendEnvelopeMails
|
||||
|
||||
Protected Overrides Async Sub OnStart(ByVal args() As String)
|
||||
Try
|
||||
@@ -53,10 +54,13 @@ Public Class Service
|
||||
|
||||
' === Initialize Queue ===
|
||||
|
||||
Logger.Debug("Inititalize Quartz")
|
||||
Logger.Debug("Inititalizing scheduler(s) ...")
|
||||
|
||||
Scheduler = New Scheduler(LogConfig, Config.ConnectionString, oKey, Config.PDFBurnerParams)
|
||||
Await Scheduler.Start(Config.IntervalInMin)
|
||||
Scheduler1 = New Scheduler_FinishEnvelope(LogConfig, Config.ConnectionString, oKey, Config.PDFBurnerParams)
|
||||
Await Scheduler1.Start(Config.IntervalInMin)
|
||||
|
||||
Scheduler2 = New Scheduler_API_SendEnvelopeMails(LogConfig, Config.ConnectionString)
|
||||
Await Scheduler2.Start(Config.IntervalInMin)
|
||||
|
||||
Logger.Info("Started [{0}] !", ServiceName)
|
||||
|
||||
@@ -67,8 +71,9 @@ Public Class Service
|
||||
|
||||
Protected Overrides Async Sub OnStop()
|
||||
Try
|
||||
Logger.Info("Stopping [{0}] !", ServiceName)
|
||||
Await Scheduler.Stop()
|
||||
Logger.Info("Stopping [{0}] ...", ServiceName)
|
||||
Await Scheduler1.Stop()
|
||||
Await Scheduler2.Stop()
|
||||
TempFiles.CleanUp()
|
||||
Logger.Info("Stopped [{0}] !", ServiceName)
|
||||
Catch ex As Exception
|
||||
|
||||
Reference in New Issue
Block a user