We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c376f80 commit 2c0cba0Copy full SHA for 2c0cba0
web/instances.go
@@ -88,6 +88,18 @@ func ListenInstance(reconciler *controllers.InstancierReconciler) func(http.Resp
88
}
89
conn.WriteJSON(status)
90
91
+ // While the connection is alive, we'll send the status every 30 seconds, to be sure we're not stucking the user
92
+ go func() {
93
+ for {
94
+ time.Sleep(30 * time.Second)
95
+ status, _ := reconciler.GetInstance(challengeId, instanceId)
96
+ err := conn.WriteJSON(status)
97
+ if err != nil {
98
+ return
99
+ }
100
101
+ }()
102
+
103
for range worker.Channel {
104
time.Sleep(1 * time.Second)
105
status, _ := reconciler.GetInstance(challengeId, instanceId)
0 commit comments