Skip to content

Commit

Permalink
fix: clean cache after block, filter only active user's configs
Browse files Browse the repository at this point in the history
  • Loading branch information
BulatRuslanovich committed Oct 18, 2024
1 parent 6461cea commit 59c414a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions dispatcher/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ configurations {
}

repositories {
mavenLocal()
mavenCentral()
}

Expand Down
1 change: 1 addition & 0 deletions node/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ configurations {
}

repositories {
mavenLocal()
mavenCentral()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public void processCallbackQuery(Update update) {
var state = userStateCacheService.getUserState(user.getTelegramId());

if (callbackData.equals("deactivate_me")) {
userStateCacheService.clearUserState(user.getTelegramId());
userService.deactivate(user);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void searchNewVacancies() {
while (!configs.isEmpty()) {
configs.stream()
.filter(this::queryExist)
.filter(config -> config.getAppUser().getActive())
.forEach(this::processNewVacancies);

configs = configService.getConfigsFromPage(page, SIZE_OF_PAGE);
Expand Down

0 comments on commit 59c414a

Please sign in to comment.