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() {
133
133
sendNotif ( [ requestorSocketPort ] , MATCHING_EVENT . MATCHING ) ;
134
134
await redisClient . hSet ( getPoolKey ( requestorUserId ) , 'pending' , 'false' ) ;
135
135
136
- const clause = [ `-@userId:(${ requestorUserId } ) @pending:(true)` ] ;
136
+ let clause = [ `-@userId:(${ requestorUserId } )` , ' @pending:(true)' ] ;
137
137
138
138
if ( difficulty ) {
139
139
clause . push ( `@difficulty:{${ difficulty } }` ) ;
@@ -143,6 +143,9 @@ async function match() {
143
143
clause . push ( `@topic:{${ topic } }` ) ;
144
144
}
145
145
146
+ // Push UserID clause to the back.
147
+ clause = clause . reverse ( ) ;
148
+
146
149
const searchParams = {
147
150
LIMIT : { from : 0 , size : 1 } ,
148
151
SORTBY : { BY : 'timestamp' , DIRECTION : 'ASC' } ,
You can’t perform that action at this time.
0 commit comments