Skip to content

Commit

Permalink
fix(core): fix FileWatcher loading flow from local file
Browse files Browse the repository at this point in the history
  • Loading branch information
Skraye committed Oct 23, 2024
1 parent 9162353 commit d3ccf4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void startListening(List<Path> paths) throws IOException, InterruptedExce
WatchEvent.Kind<?> kind = watchEvent.kind();
Path entry = (Path) watchEvent.context();

if (entry.endsWith(".yml") || entry.endsWith(".yaml")) {
if (entry.toString().endsWith(".yml") || entry.toString().endsWith(".yaml")) {

if (kind == StandardWatchEventKinds.ENTRY_CREATE || kind == StandardWatchEventKinds.ENTRY_MODIFY) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public FlowWithSource createOrUpdateFlow(Flow flow, String content) {

public void deleteFlow(FlowWithSource toDelete) {
flowRepositoryInterface.findByIdWithSource(toDelete.getTenantId(), toDelete.getNamespace(), toDelete.getId()).ifPresent(flowRepositoryInterface::delete);
log.debug("Flow {} has been deleted", toDelete.getId());
log.error("Flow {} has been deleted", toDelete.getId());
}

@Override
public void deleteFlow(String tenantId, String namespace, String id) {
flowRepositoryInterface.findByIdWithSource(tenantId, namespace, id).ifPresent(flowRepositoryInterface::delete);
log.debug("Flow {} has been deleted", id);
log.error("Flow {} has been deleted", id);
}
}

0 comments on commit d3ccf4f

Please sign in to comment.