subashz
09/15/2021, 6:51 PMget("/test") {
call.respond("hello")
sendNotification() // does this function call execute properly
}
Viktor Petrovski
09/16/2021, 4:28 AMsuspendedTransactionAsync(<http://Dispatchers.IO|Dispatchers.IO>) {
notificationsController.createNotificationForCommentVote(userId, commentId)
}
The call is before
call.respond("hello")
But Your solution should work as well, but if for any reason the notification sending fails you won’t know unless you have some retry messaging que or somethingAleksei Tirman [JB]
09/16/2021, 7:26 AMcall.respond
because the latter executes the whole response pipeline.Viktor Petrovski
09/16/2021, 7:27 AMsuspendedTransactionAsync
this way I respond back without waiting for the notification to be send