Skip to content

Commit

Permalink
Added exception report inside doOnce if the action fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsvedin committed Mar 5, 2024
1 parent 81203e5 commit 2443a7d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package com.lightningkite.lightningserver.tasks

import com.lightningkite.lightningdb.*
import com.lightningkite.lightningserver.core.LightningServerDsl
import com.lightningkite.lightningserver.exceptions.exceptionSettings
import com.lightningkite.lightningserver.serialization.Serialization
import kotlinx.coroutines.CoroutineScope
import kotlinx.datetime.Clock
Expand Down Expand Up @@ -86,6 +87,7 @@ suspend fun doOnce(
}
)
} catch (e: Exception) {
exceptionSettings().report(e, "doOnce: $name")
a.updateOneById(
name,
modification {
Expand Down

0 comments on commit 2443a7d

Please sign in to comment.