File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -67,14 +67,14 @@ func (f *FCFSScheduler) Run(ctx context.Context) error {
6767 }
6868
6969 /* get a transaction from the session to process */
70- transaction := curSession .TransactionQueue .Remove (curSession .TransactionQueue .Front ())
70+ transaction := curSession .TransactionQueue .Remove (curSession .TransactionQueue .Front ()).( * types. Transaction )
7171 curSession .Mutex .Unlock ()
7272
7373 /* block if all workers are busy */
7474 f .semaphore <- struct {}{}
7575
7676 /* go routine is available to be spawned */
77- go func (curSession * session.Session , transaction types.Transaction ) {
77+ go func (curSession * session.Session , transaction * types.Transaction ) {
7878 /* defer clearing the semaphore channel */
7979 defer func () { <- f .semaphore }()
8080
@@ -89,7 +89,11 @@ func (f *FCFSScheduler) Run(ctx context.Context) error {
8989 zap .Error (err ),
9090 )
9191 }
92- }(curSession , transaction .(types.Transaction ))
92+
93+ /* we assume the transaction has been processed -> updated Redis */
94+ transaction .Status = types .StatusSuccess
95+ f .curSessionManager .SaveTransactionResultsRedis (curSession , transaction , "txresults" )
96+ }(curSession , transaction )
9397 }
9498 }
9599}
You can’t perform that action at this time.
0 commit comments