move login from state to Command

This commit is contained in:
2025-03-05 00:55:38 +01:00
parent 84615dec36
commit 4b6eaaf58c
5 changed files with 71 additions and 81 deletions

View File

@@ -15,7 +15,10 @@ typealias CommandBlock<C> = CommandStream.ComputeStatus.(C) -> Unit
abstract class CommandStreamInMemory<C : Command> : CommandStream<C> {
private val logger = KotlinLogging.logger {}
private val failedCommand = mutableListOf<Command>()
private val queue: Channel<C> = Channel(onUndeliveredElement = { logger.atWarn { "${it.name} elem not send" } })
private val queue: Channel<C> =
Channel(onUndeliveredElement = {
logger.atWarn { "${it::class.simpleName} command not send" }
})
/**
* Send a new [Command] to the queue.