mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 22:09:41 +02:00
chore(edgejobs): AddEdgeJob disregards async mode EE-4855 (#8287)
This commit is contained in:
parent
5640cce4d6
commit
a09fe7e10c
14 changed files with 86 additions and 16 deletions
|
@ -2,6 +2,7 @@ package chisel
|
|||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"strings"
|
||||
|
@ -66,6 +67,10 @@ func (service *Service) GetTunnelDetails(endpointID portainer.EndpointID) portai
|
|||
|
||||
// GetActiveTunnel retrieves an active tunnel which allows communicating with edge agent
|
||||
func (service *Service) GetActiveTunnel(endpoint *portainer.Endpoint) (portainer.TunnelDetails, error) {
|
||||
if endpoint.Edge.AsyncMode {
|
||||
return portainer.TunnelDetails{}, errors.New("cannot open tunnel on async endpoint")
|
||||
}
|
||||
|
||||
tunnel := service.GetTunnelDetails(endpoint.ID)
|
||||
|
||||
if tunnel.Status == portainer.EdgeAgentActive {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue