diff --git a/prule/daemon/__main__.py b/prule/daemon/__main__.py index 58d7765f55b633c921356eaec0941feae2c77a66..1d08d7b51c32ea6659675601c77ba83059f6c0c0 100644 --- a/prule/daemon/__main__.py +++ b/prule/daemon/__main__.py @@ -59,6 +59,7 @@ API_TAG_SCOPE Boolean, If true, uses scopes and adds default ' METADATA_MESSAGE HTML insert added to the metadata JOB_PROCESS_QUIET Boolean, If true, pass --quiet to prule and do not print full result json, if false print result json (default: true) +PRINT_TIMING Boolean, If true, print debug timing information Example state file: { @@ -496,6 +497,8 @@ class PruleThread(threading.Thread): if e.code == 401: print("HTTP Error 401: Unauthorized, ClusterCockpit API TOKEN invalid?", file=sys.stderr) signal.pthread_kill(config.main_tid, signal.SIGTERM) # shutdown + if e.code == 500 and "Duplicate entry" in msg: # TODO: Tag is inserted twice. Fix once tag removal is possible. + return True return False except Exception as e: # something went horribly wrong print(e)