Jobs: Close connection for Update_HistoryEntry as well
This commit is contained in:
parent
dfb6e5cf5c
commit
90c1a5409f
@ -655,7 +655,7 @@ Public Class ImportZUGFeRDFiles
|
|||||||
Dim oSQL = $"INSERT INTO TBEDM_ZUGFERD_HISTORY_IN (COMMENT, MD5HASH, MESSAGE_ID) VALUES ('{Message}', '{MD5Checksum}', '{MessageId}')"
|
Dim oSQL = $"INSERT INTO TBEDM_ZUGFERD_HISTORY_IN (COMMENT, MD5HASH, MESSAGE_ID) VALUES ('{Message}', '{MD5Checksum}', '{MessageId}')"
|
||||||
|
|
||||||
' 09.07.2021: This can't be in the transaction since the history
|
' 09.07.2021: This can't be in the transaction since the history
|
||||||
' entry needs to be accessed by MoveAndRenameEmailToRejected shortly after
|
' Entry needs to be accessed by MoveAndRenameEmailToRejected shortly after
|
||||||
_firebird.ExecuteNonQueryWithConnection(oSQL, oConnection, Firebird.TransactionMode.WithTransaction)
|
_firebird.ExecuteNonQueryWithConnection(oSQL, oConnection, Firebird.TransactionMode.WithTransaction)
|
||||||
|
|
||||||
' Close the connection
|
' Close the connection
|
||||||
@ -674,8 +674,12 @@ Public Class ImportZUGFeRDFiles
|
|||||||
Try
|
Try
|
||||||
Dim oConnection = _firebird.GetConnection()
|
Dim oConnection = _firebird.GetConnection()
|
||||||
Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = '{Message}' WHERE MD5HASH = '{MD5Checksum}' AND MESSAGE_ID = '{MessageId}'"
|
Dim oSQL = $"UPDATE TBEDM_ZUGFERD_HISTORY_IN SET COMMENT = '{Message}' WHERE MD5HASH = '{MD5Checksum}' AND MESSAGE_ID = '{MessageId}'"
|
||||||
|
|
||||||
_firebird.ExecuteNonQueryWithConnection(oSQL, oConnection, Firebird.TransactionMode.WithTransaction)
|
_firebird.ExecuteNonQueryWithConnection(oSQL, oConnection, Firebird.TransactionMode.WithTransaction)
|
||||||
|
|
||||||
|
' Close the connection
|
||||||
|
oConnection.Close()
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_logger.Warn("History Entry count not be updated for message id [{0}] and md5 [{1}]", MessageId, MD5Checksum)
|
_logger.Warn("History Entry count not be updated for message id [{0}] and md5 [{1}]", MessageId, MD5Checksum)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user