moved log variables to prevent VNAVS when failing to read transaction record

This commit is contained in:
Infineon\StieberD
2025-06-24 19:41:20 -07:00
parent 7b386fe856
commit e523f2085d
2 changed files with 23 additions and 10 deletions

View File

@ -142,7 +142,6 @@ Service ProcessTransactionQueue()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Transaction'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
@ -152,6 +151,8 @@ Service ProcessTransactionQueue()
objQueueLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
GoSub ClearCursors
Select 'TRANSACTION_QUEUE' by 'TRANSACTION_DTM' setting Cursor then
EOF = False$
Loop
@ -162,10 +163,13 @@ Service ProcessTransactionQueue()
Until EOF
TransRec = Database_Services('ReadDataRow', 'TRANSACTION_QUEUE', TransId)
If Error_Services('NoError') then
Action = TransRec<TRANSACTION_QUEUE.ACTION$>
Table = TransRec<TRANSACTION_QUEUE.TABLE$>
Key = TransRec<TRANSACTION_QUEUE.KEY$>
HaveLock = Database_Services('GetKeyIDLock', Table, Key)
Action = TransRec<TRANSACTION_QUEUE.ACTION$>
Table = TransRec<TRANSACTION_QUEUE.TABLE$>
Key = TransRec<TRANSACTION_QUEUE.KEY$>
LogData<3> = Action
LogData<4> = Table
LogData<5> = Key
HaveLock = Database_Services('GetKeyIDLock', Table, Key)
If HaveLock then
Begin Case
Case Action EQ 'WRITE_FIELD'
@ -212,9 +216,6 @@ Service ProcessTransactionQueue()
ErrorMsg = Error_Services('GetMessage')
end
LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<3> = Action
LogData<4> = Table
LogData<5> = Key
If ErrorMsg EQ '' then
// Log success
LogData<2> = 'Successfully processed transaction ':TransId:'.'
@ -230,3 +231,16 @@ Service ProcessTransactionQueue()
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ClearCursors:
For counter = 0 to 8
ClearSelect counter
Next counter
return