File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ describe('TrendService', () => {
230230 expect . any ( Number ) ,
231231 expect . any ( String )
232232 ) ;
233- expect ( redis_service . expire ) . toHaveBeenCalledWith ( 'candidates:active' , 6 * 60 * 60 ) ;
233+ expect ( redis_service . expire ) . toHaveBeenCalledWith ( 'candidates:active' , 24 * 60 * 60 ) ;
234234 } ) ;
235235 } ) ;
236236
@@ -301,7 +301,7 @@ describe('TrendService', () => {
301301 await trend_service . updateHashtagCounts ( hashtag_job ) ;
302302
303303 expect ( redis_service . zincrby ) . toHaveBeenCalled ( ) ;
304- expect ( redis_service . expire ) . toHaveBeenCalledWith ( 'hashtag:#trending' , 6 * 60 * 60 ) ;
304+ expect ( redis_service . expire ) . toHaveBeenCalledWith ( 'hashtag:#trending' , 24 * 60 * 60 ) ;
305305 expect ( mock_pipeline . exec ) . toHaveBeenCalled ( ) ;
306306 } ) ;
307307 } ) ;
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ export class TrendService {
143143
144144 //Expire after 2 hours
145145 // We may delegate it to trend worker
146- await this . redis_service . expire ( 'candidates:active' , 6 * 60 * 60 ) ;
146+ await this . redis_service . expire ( 'candidates:active' , 24 * 60 * 60 ) ;
147147 }
148148 async insertCandidateCategories ( hashtags : HashtagJobDto ) {
149149 const pipeline = this . redis_service . pipeline ( ) ;
@@ -157,7 +157,7 @@ export class TrendService {
157157 if ( percent >= this . CATEGORY_THRESHOLD ) {
158158 // Store hashtag with its category percentage as score
159159 pipeline . zadd ( `candidates:${ category_name } ` , percent , hashtag ) ;
160- pipeline . expire ( `candidates:${ category_name } ` , 6 * 60 * 60 ) ;
160+ pipeline . expire ( `candidates:${ category_name } ` , 24 * 60 * 60 ) ;
161161 }
162162 }
163163 }
@@ -178,7 +178,7 @@ export class TrendService {
178178
179179 await this . redis_service . zincrby ( `hashtag:${ hashtag } ` , 1 , time_bucket . toString ( ) ) ;
180180
181- await this . redis_service . expire ( `hashtag:${ hashtag } ` , 6 * 60 * 60 ) ;
181+ await this . redis_service . expire ( `hashtag:${ hashtag } ` , 24 * 60 * 60 ) ;
182182 }
183183
184184 await pipeline . exec ( ) ;
You can’t perform that action at this time.
0 commit comments