Skip to content

Commit

Permalink
fix: use RunContext storage object
Browse files Browse the repository at this point in the history
  • Loading branch information
fhussonnois committed Jun 12, 2024
1 parent 20affe4 commit 7952274
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public Query.Output run(RunContext runContext) throws Exception {

if (outputFiles != null) {
outputFiles
.forEach(throwBiConsumer((k, v) -> uploaded.put(k, runContext.putTempFile(new File(runContext.render(v, additionalVars))))));
.forEach(throwBiConsumer((k, v) -> uploaded.put(k, runContext.storage().putFile(new File(runContext.render(v, additionalVars))))));
}

return Output.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.common.collect.ImmutableMap;
import io.kestra.core.runners.RunContext;
import io.kestra.core.runners.RunContextFactory;
import io.kestra.core.utils.VersionProvider;
import io.kestra.plugin.jdbc.AbstractJdbcQuery;
import io.kestra.core.junit.annotations.KestraTest;
import jakarta.inject.Inject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public Output run(RunContext runContext) throws Exception {

return Output
.builder()
.uri(runContext.putTempFile(path.toFile()))
.uri(runContext.storage().putFile(path.toFile()))
.rowCount(rowsAffected)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public Download.Output run(RunContext runContext) throws Exception {

return Output
.builder()
.uri(runContext.putTempFile(tempFile))
.uri(runContext.storage().putFile(tempFile))
.build();
}
}
Expand Down

0 comments on commit 7952274

Please sign in to comment.