The logic of searching for valid users has been moved to the database#28
Merged
monkey-keeper merged 1 commit intomainfrom Mar 19, 2025
Merged
The logic of searching for valid users has been moved to the database#28monkey-keeper merged 1 commit intomainfrom
monkey-keeper merged 1 commit intomainfrom
Conversation
SHVERR
approved these changes
Mar 18, 2025
AliKamil
approved these changes
Mar 19, 2025
| public void sendNewsDigest() { | ||
| log.info("Sending news digest"); | ||
| List<Subscription> subscriptionList = subscriptionService.findAll(); | ||
| List<Subscription> subscriptionList = subscriptionService.findNewsToValidSubscriptions(); |
| Set<String> sendNews = new HashSet<>(); | ||
|
|
||
| List<NewsDto> newNews = subscriptionService.getActualNews(chatId, 3); // userService.findActualNews(chatId); | ||
| List<NewsDto> newNews = subscriptionService.getActualNews(chatId, 3); |
Owner
There was a problem hiding this comment.
Это мы лимит хардкодим? Вынеси тогда в константу, чтобы читалось нормально.
| @Getter | ||
| @AllArgsConstructor | ||
| public enum TimeInterval { | ||
| // при внесении изменений придется менять SubscriptionRepository, так как там используется ORDINAL |
Owner
There was a problem hiding this comment.
Чтобы не забыть надо писать тесты, тогда они начнут падать если забудешь поменять. Все эти комментарии - бесполезны практически, ставь жесткие ограничения.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.