(actorID string)
| 72 | } |
| 73 | |
| 74 | func 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 | } |
no test coverage detected