mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
actions: minor bug fixes and improvements (#18904)
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -25,6 +26,7 @@ const (
|
||||
type execSession struct {
|
||||
client *Client
|
||||
alloc *Allocation
|
||||
job string
|
||||
task string
|
||||
tty bool
|
||||
command []string
|
||||
@@ -101,7 +103,7 @@ func (s *execSession) startConnection() (*websocket.Conn, error) {
|
||||
q.Params["action"] = s.action
|
||||
q.Params["allocID"] = s.alloc.ID
|
||||
q.Params["group"] = s.alloc.TaskGroup
|
||||
reqPath = fmt.Sprintf("/v1/job/%s/action", s.alloc.JobID)
|
||||
reqPath = fmt.Sprintf("/v1/job/%s/action", url.PathEscape(s.job))
|
||||
}
|
||||
|
||||
var conn *websocket.Conn
|
||||
|
||||
Reference in New Issue
Block a user