Skip to content
Snippets Groups Projects
Commit cf535755 authored by Alex Wiens's avatar Alex Wiens
Browse files

prule.daemon: Add workaround tag api

parent a7d63749
Branches main
No related tags found
No related merge requests found
...@@ -612,6 +612,8 @@ class PruleThread(threading.Thread): ...@@ -612,6 +612,8 @@ class PruleThread(threading.Thread):
return (False, 401) return (False, 401)
if e.code == 500 and "Duplicate entry" in msg: # TODO: Tag is inserted twice. Fix once tag removal is possible. if e.code == 500 and "Duplicate entry" in msg: # TODO: Tag is inserted twice. Fix once tag removal is possible.
return (True, 0) return (True, 0)
if e.code == 500 and "UNIQUE constraint failed: jobtag.job_id, jobtag.tag_id" in msg: # TODO: Tag is inserted twice. Fix once tag removal is possible.
return (True, 0)
return (False, e.code if e.code > 0 else 999) return (False, e.code if e.code > 0 else 999)
except Exception as e: # something went horribly wrong except Exception as e: # something went horribly wrong
traceback.print_exc() traceback.print_exc()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment