mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-03-04 01:02:28 +00:00
[OP-12] fixing truncating date for news posts locks resulting in longer period until it was locked
This commit is contained in:
@@ -52,7 +52,7 @@ public class NewsServiceBean {
|
||||
|
||||
@Transactional
|
||||
public void lockNewsPosts() {
|
||||
Instant oldestDate = Instant.now().minus(postLockSeconds, ChronoUnit.SECONDS).truncatedTo(ChronoUnit.DAYS);
|
||||
Instant oldestDate = Instant.now().minus(postLockSeconds, ChronoUnit.SECONDS);
|
||||
log.info("Locking news posts older than {}.", oldestDate);
|
||||
List<NewsPost> oldPosts = newsPostManagementServiceBean.findNewsPostsOlderNotLocked(oldestDate);
|
||||
log.info("Locking {} news posts.", oldPosts.size());
|
||||
|
||||
Reference in New Issue
Block a user