Skip to content

Commit

Permalink
Pipe Worker Output Action Names
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-the-edwards committed Dec 13, 2024
1 parent 0a219dc commit f6ee63f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ internal suspend fun <
) {
suspendCancellableCoroutine<Unit> { continuation ->
val resumingAction = object : WorkflowAction<PropsT, StateT, OutputT>() {
override fun toString(): String = "sendAndAwaitApplication($action)"
// Pipe through debugging name to the original action.
override val debuggingName: String
get() = action.debuggingName

override fun Updater.apply() {
// Don't execute anything if the caller was cancelled while we were in the queue.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,12 @@ internal suspend fun <OutputT> runWorker(
}

private class EmitWorkerOutputAction<P, S, O>(
private val worker: Worker<*>,
private val renderKey: String,
worker: Worker<*>,
renderKey: String,
private val output: O,
) : WorkflowAction<P, S, O>() {
override val debuggingName: String
get() = CommonKClassTypeNamer.uniqueName(EmitWorkerOutputAction::class) +
"(worker=$worker, key=$renderKey)"
override val debuggingName: String =
"EmitWorkerOutputAction(worker=$worker, key=$renderKey)"

override fun Updater.apply() {
setOutput(output)
Expand Down

0 comments on commit f6ee63f

Please sign in to comment.