Ms
This commit is contained in:
parent
673aa6bf95
commit
eed9848f43
@ -42,10 +42,12 @@ Public Class EmailService
|
|||||||
|
|
||||||
_LogConfig.Debug = _Config.Debug
|
_LogConfig.Debug = _Config.Debug
|
||||||
|
|
||||||
|
|
||||||
Dim oCurrentDomain As AppDomain = AppDomain.CurrentDomain
|
Dim oCurrentDomain As AppDomain = AppDomain.CurrentDomain
|
||||||
AddHandler oCurrentDomain.UnhandledException, AddressOf AppDomain_UnhandledException
|
AddHandler oCurrentDomain.UnhandledException, AddressOf AppDomain_UnhandledException
|
||||||
|
|
||||||
_Logger = _LogConfig.GetLogger()
|
_Logger = _LogConfig.GetLogger()
|
||||||
|
_Logger.Info($"DEBUG = {_LogConfig.Debug}")
|
||||||
|
|
||||||
_Logger.Info("Starting {0}", ServiceName)
|
_Logger.Info("Starting {0}", ServiceName)
|
||||||
|
|
||||||
@ -92,11 +94,9 @@ Public Class EmailService
|
|||||||
_limilab = New Limilab(_LogConfig)
|
_limilab = New Limilab(_LogConfig)
|
||||||
_MailSender = New MailSender(_LogConfig)
|
_MailSender = New MailSender(_LogConfig)
|
||||||
|
|
||||||
_Logger.EndBlock()
|
|
||||||
|
|
||||||
' === Initialize Queue ===
|
' === Initialize Queue ===
|
||||||
|
|
||||||
_Logger.NewBlock("Inititalize Queue")
|
_Logger.Debug("Inititalize Queue")
|
||||||
|
|
||||||
If _AnyDatabaseInitialized Then
|
If _AnyDatabaseInitialized Then
|
||||||
_EmailQueue = New BackgroundWorker() With {
|
_EmailQueue = New BackgroundWorker() With {
|
||||||
@ -108,11 +108,9 @@ Public Class EmailService
|
|||||||
AddHandler _EmailQueue.RunWorkerCompleted, AddressOf EmailQueue_Completed
|
AddHandler _EmailQueue.RunWorkerCompleted, AddressOf EmailQueue_Completed
|
||||||
End If
|
End If
|
||||||
|
|
||||||
_Logger.EndBlock()
|
|
||||||
|
|
||||||
' === Initialize & Start Timer ===
|
' === Initialize & Start Timer ===
|
||||||
|
|
||||||
_Logger.NewBlock("Initialize & Start Timer")
|
_Logger.Debug("Initialize & Start Timer")
|
||||||
|
|
||||||
If _AnyDatabaseInitialized Then
|
If _AnyDatabaseInitialized Then
|
||||||
_QueueTimer = New Timer With {
|
_QueueTimer = New Timer With {
|
||||||
@ -123,8 +121,6 @@ Public Class EmailService
|
|||||||
AddHandler _QueueTimer.Elapsed, AddressOf QueueTimer_Elapsed
|
AddHandler _QueueTimer.Elapsed, AddressOf QueueTimer_Elapsed
|
||||||
End If
|
End If
|
||||||
|
|
||||||
_Logger.EndBlock()
|
|
||||||
|
|
||||||
' === Initial Run ===
|
' === Initial Run ===
|
||||||
|
|
||||||
If _AnyDatabaseInitialized Then
|
If _AnyDatabaseInitialized Then
|
||||||
@ -476,7 +472,7 @@ Public Class EmailService
|
|||||||
End If
|
End If
|
||||||
MSSQLInstance.ExecuteNonQuery(oSQL)
|
MSSQLInstance.ExecuteNonQuery(oSQL)
|
||||||
End Select
|
End Select
|
||||||
_Logger.Info($"EmailID [{oGuid.ToString}] has been send to: {oEmailTo} - althogh there was an error in connection close!")
|
_Logger.Info($"EmailID [{oGuid.ToString}] has been send to: {oEmailTo} - although there was an error in connection close!")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user