Skip to content

Commit

Permalink
Merge pull request #164 from kthcloud/dev
Browse files Browse the repository at this point in the history
hotfixes
  • Loading branch information
saffronjam authored Sep 4, 2023
2 parents 5ca0bb6 + 8ac4908 commit a7bca31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions models/sys/vm/gpu/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ func New() *Client {
}

func NewWithExclusion(excludedHosts []string, excludedGPUs []string) *Client {
if excludedHosts == nil {
excludedHosts = make([]string, 0)
}

if excludedGPUs == nil {
excludedGPUs = make([]string, 0)
}

return &Client{
ExcludedHosts: excludedHosts,
ExcludedGPUs: excludedGPUs,
Expand Down
4 changes: 3 additions & 1 deletion routers/api/v1/v1_deployment/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ func GetLogs(c *gin.Context) {
case websocket.CloseNormalClosure,
websocket.CloseGoingAway,
websocket.CloseNoStatusReceived:
logContext.Done()
if logContext != nil {
logContext.Done()
}
log.Println("websocket closed for deployment ", requestURI.DeploymentID)
return
}
Expand Down

0 comments on commit a7bca31

Please sign in to comment.