https://kotlinlang.org logo
#ktor
Title
# ktor
m

Marcin Wisniowski

05/22/2018, 12:50 AM
The actual response to the request is sent immediately, the delayed query doesn't affect anything other than the database
d

Deactivated User

05/22/2018, 12:05 PM
As Marshall Pierce suggested, you can do a launch + delay. Something like this should work:
Copy code
launch(DefaultDispatcher) {
    delay(30L, TimeUnit.SECONDS)
    // do the query
}
call.respond(...)
m

Marcin Wisniowski

05/22/2018, 3:35 PM
Ah, this makes sense. Thank you!
2 Views