diff --git a/pom.xml b/pom.xml index c01ea34..d449553 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.3.2 + 3.3.3 ch.climbd diff --git a/src/main/java/ch/climbd/newsfeed/controller/MongoController.java b/src/main/java/ch/climbd/newsfeed/controller/MongoController.java index f280a04..400d353 100644 --- a/src/main/java/ch/climbd/newsfeed/controller/MongoController.java +++ b/src/main/java/ch/climbd/newsfeed/controller/MongoController.java @@ -46,7 +46,7 @@ public List findAllOrderedByDate(Set language) { query.addCriteria(Criteria.where("language").in(language)); query.with(Sort.by(Sort.Direction.DESC, "publishedAt")); query.limit(100); - query.maxTimeMsec(1000); + query.maxTimeMsec(5000); return template.find(query, NewsEntry.class); } @@ -70,7 +70,7 @@ public List findAllOrderedByVotes(Set language) { query.addCriteria(Criteria.where("votes").gte(1)); query.with(Sort.by(Sort.Direction.DESC, "publishedAt")); query.limit(100); - query.maxTimeMsec(1000); + query.maxTimeMsec(5000); var result = template.find(query, NewsEntry.class); result.sort(compareByVotePerDay); @@ -96,7 +96,7 @@ public List findAllOrderedByViews(Set language) { query.addCriteria(Criteria.where("views").gte(1)); query.with(Sort.by(Sort.Direction.DESC, "views")); query.limit(100); - query.maxTimeMsec(1000); + query.maxTimeMsec(5000); var result = template.find(query, NewsEntry.class); result.sort(compareByViewPerDay); @@ -108,7 +108,7 @@ public List findAllFilterdBySite(String host) { query.addCriteria(Criteria.where("link").regex("^" + host)); query.with(Sort.by(Sort.Direction.DESC, "publishedAt")); query.limit(100); - query.maxTimeMsec(1000); + query.maxTimeMsec(5000); return template.find(query, NewsEntry.class); } @@ -118,7 +118,7 @@ public List findLast100PostsPostedInTheLast48h() { query.addCriteria(Criteria.where("publishedAt").gte(ZonedDateTime.now().minusDays(2).toInstant())); query.with(Sort.by(Sort.Direction.DESC, "publishedAt")); query.limit(100); - query.maxTimeMsec(1000); + query.maxTimeMsec(5000); return template.find(query, NewsEntry.class); }