mudasar187
10/14/2024, 7:54 AMfun Route.mottakApi(
readAndParseFileService: ReadAndParseFileService = ReadAndParseFileService(),
validateTransaksjonService: ValidateTransaksjonService = ValidateTransaksjonService(),
writeToFileService: WriteToFileService = WriteToFileService(),
sendUtbetalingTransaksjonToOppdragZService: SendUtbetalingTransaksjonToOppdragZService =
SendUtbetalingTransaksjonToOppdragZService(
mqBatchSize = PropertiesConfig.MQProperties().mqBatchSize,
),
sendTrekkTransaksjonToOppdragZService: SendTrekkTransaksjonToOppdragZService =
SendTrekkTransaksjonToOppdragZService(
mqBatchSize = PropertiesConfig.MQProperties().mqBatchSize,
),
avstemmingService: AvstemmingService = AvstemmingService(),
) {
route("api/v1") {
get("readParseFileAndValidateTransactions") {
launch(<http://Dispatchers.IO|Dispatchers.IO>) {
readAndParseFileService.readAndParseFile()
validateTransaksjonService.validateInnTransaksjon()
writeToFileService.writeReturnFile()
}
call.respond(HttpStatusCode.OK, "ReadAndParseFile av filer har startet, sjekk logger for status")
}
launch
is coming from:
import kotlinx.coroutines.launch
After upgrading to Ktor 3.0 i get this error:e5l
10/14/2024, 7:54 AMcall.launch
instead?mudasar187
10/14/2024, 7:55 AMe5l
10/14/2024, 7:56 AMmudasar187
10/14/2024, 8:04 AM