mirror of
https://github.com/gotson/komga.git
synced 2026-01-03 14:24:11 +01:00
refactor: refine logs
This commit is contained in:
parent
6a8e1f94ec
commit
d275506eac
2 changed files with 3 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ class LibraryScanner(
|
|||
} else {
|
||||
// if series already exists, update it
|
||||
if (newSeries.fileLastModified.truncatedTo(ChronoUnit.MILLIS) != existingSeries.fileLastModified.truncatedTo(ChronoUnit.MILLIS)) {
|
||||
logger.info { "Series changed on disk, updating: $newSeries" }
|
||||
logger.info { "Series changed on disk, updating: $existingSeries" }
|
||||
existingSeries.fileLastModified = newSeries.fileLastModified
|
||||
|
||||
// update list of books with existing entities if they exist
|
||||
|
|
@ -54,7 +54,7 @@ class LibraryScanner(
|
|||
val existingBook = bookRepository.findByUrl(newBook.url) ?: newBook
|
||||
|
||||
if (newBook.fileLastModified.truncatedTo(ChronoUnit.MILLIS) != existingBook.fileLastModified.truncatedTo(ChronoUnit.MILLIS)) {
|
||||
logger.info { "Book changed on disk, update and reset media status: $newBook" }
|
||||
logger.info { "Book changed on disk, update and reset media status: $existingBook" }
|
||||
existingBook.fileLastModified = newBook.fileLastModified
|
||||
existingBook.fileSize = newBook.fileSize
|
||||
existingBook.media.reset()
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ class PeriodicScannerController(
|
|||
@EventListener(classes = [ApplicationReadyEvent::class], condition = "@komgaProperties.librariesScanStartup")
|
||||
@Scheduled(cron = "#{@komgaProperties.librariesScanCron ?: '-'}")
|
||||
fun scanAllLibraries() {
|
||||
logger.info { "Periodic libraries scan starting" }
|
||||
taskReceiver.scanLibraries()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue