MCPcopy
hub / github.com/google/ax / suspendActor

Function suspendActor

internal/server/server_ate.go:74–93  ·  view source on GitHub ↗
(actorID string)

Source from the content-addressed store, hash-verified

72}
73
74func suspendActor(actorID string) {
75 client := createATEClient()
76 if client == nil {
77 return
78 }
79 c := client.(*ate.Client)
80 defer c.Close()
81
82 log.Printf("Automatically suspending actor %s in 50 milliseconds...", actorID)
83 time.Sleep(50 * time.Millisecond)
84
85 suspendCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
86 defer cancel()
87
88 if _, err := c.SuspendActor(suspendCtx, actorID); err != nil {
89 log.Printf("Failed to automatically suspend actor %s: %v", actorID, err)
90 } else {
91 log.Printf("Successfully suspended actor %s", actorID)
92 }
93}

Callers 3

ExecMethod · 0.70
ForkConversationMethod · 0.70
DeleteConversationMethod · 0.70

Calls 3

createATEClientFunction · 0.85
SuspendActorMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected