mirror of
https://github.com/gotson/komga.git
synced 2026-05-05 19:11:44 +02:00
test(benchmark): mark some books as read for on deck
This commit is contained in:
parent
bf8bbdd764
commit
0047a91a18
2 changed files with 12 additions and 0 deletions
|
|
@ -36,6 +36,16 @@ class DashboardBenchmark : AbstractRestBenchmark() {
|
|||
}
|
||||
}
|
||||
|
||||
// mark some books read for on deck
|
||||
bookController.getBooksOnDeck(principal, page = Pageable.ofSize(DEFAULT_PAGE_SIZE)).let { page ->
|
||||
if (page.totalElements < DEFAULT_PAGE_SIZE) {
|
||||
seriesController.getAllSeries(principal, readStatus = listOf(ReadStatus.UNREAD), oneshot = false, page = Pageable.ofSize(DEFAULT_PAGE_SIZE)).content.forEach { series ->
|
||||
val book = seriesController.getAllBooksBySeries(principal, series.id, page = Pageable.ofSize(1)).content.first()
|
||||
bookController.markReadProgress(book.id, ReadProgressUpdateDto(null, true), principal)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// retrieve most recent book release date
|
||||
bookLatestReleaseDate = bookController.getAllBooks(principal, page = PageRequest.of(0, 1, Sort.by(Sort.Order.desc("metadata.releaseDate"))))
|
||||
.content.firstOrNull()?.metadata?.releaseDate ?: LocalDate.now()
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ komga:
|
|||
file: \${komga.config-dir}/\${komga.workspace}.sqlite
|
||||
lucene:
|
||||
data-directory: \${komga.config-dir}/lucene/\${komga.workspace}
|
||||
tasks-db:
|
||||
file: \${komga.config-dir}/\${komga.workspace}-tasks.sqlite
|
||||
spring:
|
||||
flyway:
|
||||
enabled: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue