change hardcoded paths and introduce -f flag for calling analysis.py from frontende to skip device.json in report generation

This commit is contained in:
Janik Besendorf
2021-10-12 11:07:24 +02:00
parent 48539a13df
commit c170ae2fb2
5 changed files with 90 additions and 62 deletions

View File

@ -24,7 +24,7 @@ class Analysis(object):
if self.token is not None:
parent = "/".join(sys.path[0].split("/")[:-2])
sp.Popen(
[sys.executable, "{}/analysis/analysis.py".format(parent), "/tmp/{}".format(self.token)])
[sys.executable, "{}/analysis/analysis.py".format(parent), "-f", "/tmp/{}".format(self.token)])
return {"status": True,
"message": "Analysis started",
"token": self.token}