File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed
server/src/services/PostService Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ export class GenerateFeedJob extends JobProgress implements Job {
22
22
const { fk_following_id, fk_post_id } = data
23
23
try {
24
24
await this . feedService . createFeed ( { followingId : fk_following_id , postId : fk_post_id } )
25
- await this . redis . lpop ( feedQueueName )
26
- handledQueueCount ++
27
25
} catch ( error ) {
28
26
console . log ( 'Error occurred while creating feed' , error )
29
27
console . log ( 'data' , data )
30
- continue
28
+ } finally {
29
+ await this . redis . lpop ( feedQueueName )
30
+ handledQueueCount ++
31
31
}
32
32
}
33
33
console . log ( `Created Feed Count: ${ handledQueueCount } ` )
Original file line number Diff line number Diff line change @@ -405,19 +405,7 @@ export class PostService implements Service {
405
405
}
406
406
}
407
407
public async updatePostScore ( postId : string ) {
408
- console . log ( 'upodatePostScore' , postId )
409
408
await this . redis . addToScorePostQueue ( { post_id : postId } )
410
- try {
411
- await axios . patch (
412
- `${ ENV . cronHost } /api/posts/v1/score/${ postId } ` ,
413
- { } ,
414
- {
415
- headers : {
416
- 'Cron-Api-Key' : ENV . cronApiKey ,
417
- } ,
418
- } ,
419
- )
420
- } catch ( _ ) { }
421
409
}
422
410
public shortDescription ( post : Post ) : string {
423
411
if ( post . short_description ) return post . short_description
You can’t perform that action at this time.
0 commit comments