Skip to content

Commit

Permalink
Last fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eolivelli committed Oct 26, 2023
1 parent 7b84a1d commit ed4b9b8
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,15 @@ private void executeOnDocker(

try (WatchService watcher = FileSystems.getDefault().newWatchService(); ) {
if (watchFiles) {
startWatchService(appTmp.toPath(), watcher);
Path python = appTmp.toPath().resolve("python");
if (Files.isDirectory(python)) { // only watch if python is present
startWatchService(appTmp.toPath(), watcher);
} else {
log(
"Python directory "
+ python.toAbsolutePath()
+ " not found, not watching files");
}
}

final Path outputLog = Files.createTempFile("langstream", ".log");
Expand Down Expand Up @@ -442,7 +450,7 @@ private void startWatchService(Path applicationDirectory, WatchService watcher)
private static void restartAgents() {
HttpURLConnection urlConnection = null;
try {
URL url = new URL("http://localhost:7890/commands/restart");
URL url = new URL("http://localhost:8790/commands/restart");
System.out.println("Calling " + url + " to restart the agents");
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestMethod("POST");
Expand Down

0 comments on commit ed4b9b8

Please sign in to comment.