Skip to content

Commit

Permalink
fix: toolbox session import
Browse files Browse the repository at this point in the history
Signed-off-by: Toma Puljak <[email protected]>
  • Loading branch information
Tpuljak committed Jan 21, 2025
1 parent 1b401df commit 1f39b4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/agent/toolbox/process/session/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"strings"

"github.com/daytonaio/daytona/internal/util"
"github.com/daytonaio/daytona/pkg/logs"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
)
Expand Down Expand Up @@ -77,7 +78,7 @@ func SessionExecuteCommand(configDir string) func(c *gin.Context) {
logChan := make(chan []byte)
errChan := make(chan error)

go util.ReadLog(context.Background(), logFile, true, logChan, errChan)
go logs.ReadLog(context.Background(), logFile, true, logChan, errChan)

defer logFile.Close()

Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/toolbox/process/session/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"os"

"github.com/daytonaio/daytona/internal/util"
"github.com/daytonaio/daytona/pkg/api/controllers/log"
"github.com/daytonaio/daytona/pkg/logs"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
)
Expand Down Expand Up @@ -44,7 +44,7 @@ func GetSessionCommandLogs(configDir string) func(c *gin.Context) {
return
}
defer logFile.Close()
log.ReadLog(c, logFile, util.ReadLog, func(conn *websocket.Conn, messages chan []byte, errors chan error) {
log.ReadLog(c, logFile, logs.ReadLog, func(conn *websocket.Conn, messages chan []byte, errors chan error) {
for {
msg := <-messages
_, output := extractExitCode(string(msg))
Expand Down

0 comments on commit 1f39b4c

Please sign in to comment.