chore(system): refactor NamespaceFilesUtils as a static class

Part-of: https://github.com/kestra-io/kestra-ee/issues/4228
This commit is contained in:
Loïc Mathieu
2025-12-11 16:39:47 +01:00
parent 0c14ea621c
commit 0f38e19663
5 changed files with 27 additions and 31 deletions

View File

@@ -149,8 +149,7 @@ public class CommandsWrapper implements TaskCommands {
public <T extends TaskRunnerDetailResult> ScriptOutput run() throws Exception {
if (this.namespaceFiles != null && !Boolean.FALSE.equals(runContext.render(this.namespaceFiles.getEnabled()).as(Boolean.class).orElse(true))) {
NamespaceFilesUtils namespaceFilesUtils = ((DefaultRunContext) runContext).getApplicationContext().getBean(NamespaceFilesUtils.class);
namespaceFilesUtils.loadNamespaceFiles(runContext, this.namespaceFiles);
NamespaceFilesUtils.loadNamespaceFiles(runContext, this.namespaceFiles);
}
TaskRunner<T> realTaskRunner = this.getTaskRunner();