mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 08:32:25 +01:00
catch async exceptions
This commit is contained in:
parent
c0fc4aba0e
commit
43daabde6b
1 changed files with 7 additions and 1 deletions
|
|
@ -87,7 +87,13 @@ class LibraryManager(
|
|||
measureTimeMillis {
|
||||
sumOfTasksTime = booksToParse
|
||||
.map { bookManager.parseAndPersist(it) }
|
||||
.map { it.get() }
|
||||
.map {
|
||||
try {
|
||||
it.get()
|
||||
} catch (ex: Exception) {
|
||||
0L
|
||||
}
|
||||
}
|
||||
.sum()
|
||||
}.also {
|
||||
logger.info { "Parsed ${booksToParse.size} books in ${DurationFormatUtils.formatDurationHMS(it)} (virtual: ${DurationFormatUtils.formatDurationHMS(sumOfTasksTime)})" }
|
||||
|
|
|
|||
Loading…
Reference in a new issue