Prevent failed Spinner transforms from blocking query.
This commit is contained in:
parent
657a9c7b0a
commit
9505c3d070
1 changed files with 6 additions and 2 deletions
|
@ -78,7 +78,7 @@ internal class SpinnerServer(
|
|||
val commands: Queue<QueryItem> = recentSql[dbName] ?: ConcurrentLinkedQueue()
|
||||
|
||||
commands += QueryItem(System.currentTimeMillis(), sql)
|
||||
if (commands.size > 100) {
|
||||
if (commands.size > 500) {
|
||||
commands.remove()
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,11 @@ internal class SpinnerServer(
|
|||
val row = mutableListOf<String>()
|
||||
for (i in 0 until numColumns) {
|
||||
val columnName: String = getColumnName(i)
|
||||
row += transformers[i].transform(null, columnName, this)
|
||||
try {
|
||||
row += transformers[i].transform(null, columnName, this)
|
||||
} catch (e: Exception) {
|
||||
row += "*Failed to Transform*\n\n${DefaultColumnTransformer.transform(null, columnName, this)}"
|
||||
}
|
||||
}
|
||||
|
||||
rows += row
|
||||
|
|
Loading…
Add table
Reference in a new issue