Skip to content

Commit

Permalink
Fixed executor
Browse files Browse the repository at this point in the history
  • Loading branch information
Loic-Vanden-Bossche committed Jul 25, 2023
1 parent 5ae722d commit 33e0704
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion executor-node.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.11.1-slim-bullseye as node-base
FROM node:18 as node-base

FROM fpr-executor-base:latest

Expand Down
1 change: 1 addition & 0 deletions src/executors/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod executor;
mod python_executor;
mod python_node;
pub mod types;
12 changes: 12 additions & 0 deletions src/executors/python_node.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use std::process::{Child, Command, Stdio};

pub fn python_executor(script_path: String) -> Child {
match Command::new("node")
.args(&[script_path])
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.spawn() {
Ok(child) => child,
Err(e) => panic!("Failed to start Node script: {}", e),
}
}

0 comments on commit 33e0704

Please sign in to comment.