|
|
@ -131,11 +131,18 @@ class CheckSourceService : BaseService() { |
|
|
|
}.timeout(180000L) |
|
|
|
}.timeout(180000L) |
|
|
|
.onError { |
|
|
|
.onError { |
|
|
|
source.addGroup("失效") |
|
|
|
source.addGroup("失效") |
|
|
|
source.bookSourceComment = |
|
|
|
source.bookSourceComment = """ |
|
|
|
"error:${it.localizedMessage}\n${source.bookSourceComment}" |
|
|
|
"error:${it.localizedMessage} |
|
|
|
|
|
|
|
${source.bookSourceComment}" |
|
|
|
|
|
|
|
""".trimIndent() |
|
|
|
appDb.bookSourceDao.update(source) |
|
|
|
appDb.bookSourceDao.update(source) |
|
|
|
}.onSuccess { |
|
|
|
}.onSuccess { |
|
|
|
source.removeGroup("失效") |
|
|
|
source.removeGroup("失效") |
|
|
|
|
|
|
|
source.bookSourceComment = source.bookSourceComment |
|
|
|
|
|
|
|
?.split("\n") |
|
|
|
|
|
|
|
?.filterNot { |
|
|
|
|
|
|
|
it.startsWith("error:") |
|
|
|
|
|
|
|
}?.joinToString("\n") |
|
|
|
appDb.bookSourceDao.update(source) |
|
|
|
appDb.bookSourceDao.update(source) |
|
|
|
}.onFinally { |
|
|
|
}.onFinally { |
|
|
|
onNext(source.bookSourceUrl, source.bookSourceName) |
|
|
|
onNext(source.bookSourceUrl, source.bookSourceName) |
|
|
|