Refactoring
This commit is contained in:
@@ -3,7 +3,7 @@ const path = require("path");
|
||||
|
||||
async function renderWithPython({ type, data, outputPath }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const scriptPath = path.resolve(__dirname, "../../render_stats_charts.py");
|
||||
const scriptPath = path.resolve(__dirname, "../render_stats_charts.py");
|
||||
const child = spawn("python3", [scriptPath, "--type", type, "--output", outputPath], {
|
||||
stdio: ["pipe", "inherit", "inherit"],
|
||||
});
|
||||
@@ -29,4 +29,3 @@ async function renderWithPython({ type, data, outputPath }) {
|
||||
module.exports = {
|
||||
renderWithPython,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user