mirror of
https://github.com/simon987/sist2.git
synced 2025-12-12 15:08:53 +00:00
Add button for full reindex, fixes #403
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user