Skip to content

Commit

Permalink
fix ktlint
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer committed Sep 10, 2024
1 parent 4b31e5b commit 0c3218d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ class SubmissionDatabaseService(

fun cleanUpStaleSequencesInProcessing(timeToStaleInSeconds: Long) {
val staleDateTime = Instant.fromEpochMilliseconds(
Clock.System.now().toEpochMilliseconds() - timeToStaleInSeconds * 1000
Clock.System.now().toEpochMilliseconds() - timeToStaleInSeconds * 1000,
).toLocalDateTime(TimeZone.UTC)

transaction {
Expand All @@ -991,13 +991,12 @@ class SubmissionDatabaseService(
.selectAll()
.where {
SequenceEntriesPreprocessedDataTable.statusIs(PreprocessingStatus.IN_PROCESSING) and
(SequenceEntriesPreprocessedDataTable.startedProcessingAtColumn.less(staleDateTime))
(SequenceEntriesPreprocessedDataTable.startedProcessingAtColumn.less(staleDateTime))
}
.limit(1)
.empty()
.not()


if (staleSequencesExist) {
val numberDeleted = SequenceEntriesPreprocessedDataTable.deleteWhere {
statusIs(IN_PROCESSING) and startedProcessingAtColumn.less(staleDateTime)
Expand Down

0 comments on commit 0c3218d

Please sign in to comment.