Skip to content

Commit

Permalink
Remove commented debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kunyavskiy committed Oct 27, 2024
1 parent 5c4b00e commit 177f8f9
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ internal fun Flow<ContestUpdate>.processByTimeCut(
process: (RunInfo) -> RunInfo
): Flow<ContestUpdate> = contestState().transform {
suspend fun emit(info: RunInfo, cut: Duration) {
// println("${info.id} ${info.time} ${info.result} $cut ${it.lastEvent}")
if (info.time > cut) {
emit(RunUpdate(process(info)))
} else {
Expand All @@ -31,13 +30,12 @@ internal fun Flow<ContestUpdate>.processByTimeCut(
if (oldCut != newCut) {
it.runsAfterEvent.values
.filter { run -> (run.time > oldCut) != (run.time > newCut) }
// .also { println("Updated runs: ${it.map { run -> run.id }}")}
.forEach { run -> emit(run, newCut) }
}
}
is CommentaryMessagesUpdate -> emit(it.lastEvent)
}
}.onEach { /* if (it is RunUpdate) println("${it.newInfo.id} ${it.newInfo.time} ${it.newInfo.result}") */ }
}

internal fun removeFrozenSubmissionsResults(flow: Flow<ContestUpdate>): Flow<ContestUpdate> =
flow.processByTimeCut(
Expand Down

0 comments on commit 177f8f9

Please sign in to comment.