Add button for full reindex, fixes #403

This commit is contained in:
2023-10-20 20:47:15 -04:00
committed by simon987
parent 6ade3395d5
commit ffa7f2ae84
4 changed files with 27 additions and 7 deletions

View File

@@ -169,11 +169,14 @@ def _run_job(job: Sist2Job):
@app.get("/api/job/{name:str}/run")
async def run_job(name: str):
job = db["jobs"][name]
async def run_job(name: str, full: bool = False):
job: Sist2Job = db["jobs"][name]
if not job:
raise HTTPException(status_code=404)
if full:
job.do_full_scan = True
_run_job(job)
return "ok"