Skip to content

Commit

Permalink
Add panic log
Browse files Browse the repository at this point in the history
  • Loading branch information
wxing1292 committed Mar 9, 2022
1 parent 6d90f65 commit c62df0b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions service/history/transferQueueActiveTaskExecutor.go
Expand Up @@ -26,6 +26,7 @@ package history

import (
"context"
"encoding/json"
"fmt"
"time"

Expand Down Expand Up @@ -495,6 +496,18 @@ func (t *transferQueueActiveTaskExecutor) processSignalExecution(
}
attributes := initiatedEvent.GetSignalExternalWorkflowExecutionInitiatedEventAttributes()

if attributes == nil {
fmt.Println("####### PANIC")
prettyPrint := func(input interface{}) string {
binary, _ := json.MarshalIndent(input, "", " ")
return string(binary)
}
fmt.Printf("%v\n", prettyPrint(initiatedEvent))
fmt.Printf("%v\n", prettyPrint(initiatedEvent))
fmt.Printf("%v/%v: %v\n", execution.GetWorkflowId(), execution.GetRunId(), prettyPrint(initiatedEvent))
fmt.Println("####### PANIC")
}

targetNamespaceEntry, err := t.shard.GetNamespaceRegistry().GetNamespaceByID(namespace.ID(task.TargetNamespaceID))
if err != nil {
return err
Expand Down

0 comments on commit c62df0b

Please sign in to comment.