|
|
@ -1330,9 +1330,11 @@ public class CacheImporter @Inject constructor( |
|
|
|
|
|
|
|
|
|
|
|
public suspend fun refreshViews() { |
|
|
|
public suspend fun refreshViews() { |
|
|
|
database.execute { connection -> |
|
|
|
database.execute { connection -> |
|
|
|
connection.prepareStatement(""" |
|
|
|
connection.prepareStatement( |
|
|
|
|
|
|
|
""" |
|
|
|
SELECT pg_try_advisory_lock(0) |
|
|
|
SELECT pg_try_advisory_lock(0) |
|
|
|
""".trimIndent()).use { stmt -> |
|
|
|
""".trimIndent() |
|
|
|
|
|
|
|
).use { stmt -> |
|
|
|
stmt.executeQuery().use { rows -> |
|
|
|
stmt.executeQuery().use { rows -> |
|
|
|
if (!rows.next()) { |
|
|
|
if (!rows.next()) { |
|
|
|
throw IllegalStateException() |
|
|
|
throw IllegalStateException() |
|
|
|