File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
backend/matching/src/workers Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ async function match() {
133133 sendNotif ( [ requestorSocketPort ] , MATCHING_EVENT . MATCHING ) ;
134134 await redisClient . hSet ( getPoolKey ( requestorUserId ) , 'pending' , 'false' ) ;
135135
136- const clause = [ `-@userId:(${ requestorUserId } ) @pending:(true)` ] ;
136+ let clause = [ `-@userId:(${ requestorUserId } )` , ' @pending:(true)' ] ;
137137
138138 if ( difficulty ) {
139139 clause . push ( `@difficulty:{${ difficulty } }` ) ;
@@ -143,6 +143,9 @@ async function match() {
143143 clause . push ( `@topic:{${ topic } }` ) ;
144144 }
145145
146+ // Push UserID clause to the back.
147+ clause = clause . reverse ( ) ;
148+
146149 const searchParams = {
147150 LIMIT : { from : 0 , size : 1 } ,
148151 SORTBY : { BY : 'timestamp' , DIRECTION : 'ASC' } ,
You can’t perform that action at this time.
0 commit comments