File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -103,18 +103,26 @@ func (f *FCFSScheduler) Run(ctx context.Context) error {
103103 curSession .Mutex .Lock ()
104104 if transaction .ExecStatus {
105105 curSession .CompletedCount ++
106- f .curSessionManager .IncrementSessionCompletedRedis (curSession )
106+ if err := f .curSessionManager .IncrementSessionCompletedRedis (curSession ); err != nil {
107+ zap .L ().Error ("Failed to increment completed session in Redis" )
108+ }
107109 } else {
108110 curSession .FailedCount ++
109- f .curSessionManager .IncrementSessionFailedRedis (curSession )
111+ if err := f .curSessionManager .IncrementSessionFailedRedis (curSession ); err != nil {
112+ zap .L ().Error ("Failed to increment failed session in Redis" )
113+ }
110114 }
111115 curSession .Mutex .Unlock ()
112116
113117 /* store the result of processed transaction into Redis */
114- f .curSessionManager .SaveTransactionRedisList (curSession , transaction , "txresults" )
118+ if err := f .curSessionManager .SaveTransactionRedisList (curSession , transaction , "txresults" ); err != nil {
119+ zap .L ().Error ("Failed to store processed transaction into Redis" )
120+ }
115121
116122 /* remove the transaction as pending from Redis */
117- f .curSessionManager .RemovePendingTransaction (curSession , transaction .ID )
123+ if err := f .curSessionManager .RemovePendingTransaction (curSession , transaction .ID ); err != nil {
124+ zap .L ().Error ("Failed to remove pending transaction from Redis" )
125+ }
118126
119127 }(curSession , transaction )
120128 }
You can’t perform that action at this time.
0 commit comments