Uncommented/disabled python-shell dependency in strayRepository.

This commit is contained in:
2022-10-02 15:58:14 +02:00
parent 96ab2902f7
commit ceebe95dfd

View File

@@ -1,5 +1,5 @@
import assert from "assert"; import assert from "assert";
import pythonShell from "python-shell"; // import pythonShell from "python-shell";
import Stray from "./stray.js"; import Stray from "./stray.js";
import establishedDatabase from "../database/database.js"; import establishedDatabase from "../database/database.js";
@@ -48,17 +48,17 @@ class StrayRepository {
return this.database.get(this.queries.checkVerified, strayId).then(row => { return this.database.get(this.queries.checkVerified, strayId).then(row => {
assert.notEqual(row, undefined, `Stray '${strayId}' already verified.`); assert.notEqual(row, undefined, `Stray '${strayId}' already verified.`);
const options = { // const options = {
pythonPath: "../app/env/bin/python3", // pythonPath: "../app/env/bin/python3",
args: [strayId] // args: [strayId]
}; // };
pythonShell.run("../app/moveSeasoned.py", options, (err, results) => { // pythonShell.run("../app/moveSeasoned.py", options, (err, results) => {
if (err) throw err; // if (err) throw err;
// TODO Add error handling!! StrayRepository.ERROR // // TODO Add error handling!! StrayRepository.ERROR
// results is an array consisting of messages collected during execution // // results is an array consisting of messages collected during execution
console.log("results: %j", results); // console.log("results: %j", results);
}); // });
return this.database.run(this.queries.verify, strayId); return this.database.run(this.queries.verify, strayId);
}); });