Skip to content

Commit

Permalink
chore(core): add new interface for accessing Kestra storage
Browse files Browse the repository at this point in the history
This commit provides a cleaner way to access kestra storage through
RunContext
  • Loading branch information
fhussonnois committed Jan 26, 2024
1 parent fa1479e commit 9e1b660
Show file tree
Hide file tree
Showing 22 changed files with 1,214 additions and 497 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.kestra.core.models.tasks.NamespaceFiles;
import io.kestra.core.storages.FileAttributes;
import io.kestra.core.storages.StorageContext;
import io.kestra.core.storages.StorageInterface;
import io.micronaut.core.annotation.Nullable;
import jakarta.inject.Inject;
Expand Down Expand Up @@ -67,7 +68,7 @@ public List<URI> inject(RunContext runContext, String tenantId, String namespace
}

private URI uri(String namespace, @Nullable URI path) {
return URI.create(storageInterface.namespaceFilePrefix(namespace) + Optional.ofNullable(path)
return URI.create(StorageContext.namespaceFilePrefix(namespace) + Optional.ofNullable(path)
.map(URI::getPath)
.orElse("")
);
Expand Down
Loading

0 comments on commit 9e1b660

Please sign in to comment.