Skip to content

Commit

Permalink
fix location of file
Browse files Browse the repository at this point in the history
  • Loading branch information
saul-gush committed Mar 19, 2022
1 parent 69271ab commit b854fa3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/mainapp/filesystem/file_create_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func FileCreateProcessor(nodeTypeDesc string, nodePath string, node models.Pipel
print("Node id: ` + node.NodeID + `")`

// log.Println(content)
filepath = nodePath + "dp-entrypoint.py"
filepath = nodePath + "/dp-entrypoint.py"
err := os.WriteFile(filepath, []byte(content), 0644)
if err != nil {
return filepath, errors.New("Failed to write python file")
Expand Down
2 changes: 1 addition & 1 deletion app/mainapp/filesystem/folder_node_add_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func FolderNodeAddUpdate(pipelineID string, environmentID string) {
switch n.NodeTypeDesc {
// Python processor
case "python":
// log.Println("Node types:", n.NodeType, n.NodeTypeDesc)
// log.Println("Node types:", n.NodeType, n.NodeTypeDesc, config.CodeDirectory+rfolder)
path, err := FileCreateProcessor(n.NodeTypeDesc, config.CodeDirectory+rfolder, node)
if err != nil {
if config.Debug == "true" {
Expand Down
4 changes: 2 additions & 2 deletions app/workers/runtask/runtask.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ func worker(ctx context.Context, msg modelmain.WorkerTaskSend) {
// Detect if folder is being requested
if strings.Contains(v, "${{nodedirectory}}") {

directoryRun := config.CodeDirectory + msg.Folder
// log.Println(config.CodeDirectory, directoryRun, msg.FolderID)
directoryRun := config.CodeDirectory + msg.Folder + "/"
// log.Println(directoryRun)

// construct the directory if the directory cant be found
if _, err := os.Stat(directoryRun); os.IsNotExist(err) {
Expand Down

0 comments on commit b854fa3

Please sign in to comment.