@@ -14,7 +14,6 @@ limitations under the License.
14
14
package standalone
15
15
16
16
import (
17
- "context"
18
17
"fmt"
19
18
"net"
20
19
"os"
@@ -24,8 +23,6 @@ import (
24
23
"strconv"
25
24
"strings"
26
25
27
- dockerClient "github.com/docker/docker/client"
28
-
29
26
"github.com/Pallinder/sillyname-go"
30
27
"github.com/phayes/freeport"
31
28
"gopkg.in/yaml.v2"
@@ -141,27 +138,21 @@ func (config *RunConfig) validatePlacementHostAddr() error {
141
138
}
142
139
143
140
func (config * RunConfig ) validateSchedulerHostAddr () error {
144
- // If the scheduler isn't running - don't add the flag to the runtime cmd.
145
- docker , err := dockerClient .NewClientWithOpts ()
146
- if err != nil {
147
- return err
141
+ schedulerHostAddr := config .SchedulerHostAddress
142
+ if len (schedulerHostAddr ) == 0 {
143
+ return nil
148
144
}
149
- _ , err = docker .ContainerInspect (context .Background (), "dapr_scheduler" )
150
- if err == nil {
151
- schedulerHostAddr := config .SchedulerHostAddress
152
- if len (schedulerHostAddr ) == 0 {
153
- schedulerHostAddr = "localhost"
154
- }
155
- if indx := strings .Index (schedulerHostAddr , ":" ); indx == - 1 {
156
- if runtime .GOOS == daprWindowsOS {
157
- schedulerHostAddr = fmt .Sprintf ("%s:6060" , schedulerHostAddr )
158
- } else {
159
- schedulerHostAddr = fmt .Sprintf ("%s:50006" , schedulerHostAddr )
160
- }
145
+
146
+ if indx := strings .Index (schedulerHostAddr , ":" ); indx == - 1 {
147
+ if runtime .GOOS == daprWindowsOS {
148
+ schedulerHostAddr = fmt .Sprintf ("%s:6060" , schedulerHostAddr )
149
+ } else {
150
+ schedulerHostAddr = fmt .Sprintf ("%s:50006" , schedulerHostAddr )
161
151
}
162
- config .SchedulerHostAddress = schedulerHostAddr
163
- return nil
164
152
}
153
+
154
+ config .SchedulerHostAddress = schedulerHostAddr
155
+
165
156
return nil
166
157
}
167
158
0 commit comments