mirror of
https://github.com/gotson/komga.git
synced 2025-01-08 11:47:47 +08:00
catch async exceptions
This commit is contained in:
parent
c0fc4aba0e
commit
43daabde6b
@ -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 New Issue
Block a user