Ignore integration test results in code coverage report.
[python_utils.git] / lockfile.py
index 38134b20d02f00f8d419b5ddfef669c5002a4abf..290710759dbc702fff757ae2561fe5c0af3051a6 100644 (file)
@@ -18,7 +18,7 @@ cfg = config.add_commandline_args(f'Lockfile ({__file__})', 'Args related to loc
 cfg.add_argument(
     '--lockfile_held_duration_warning_threshold_sec',
     type=float,
-    default=10.0,
+    default=60.0,
     metavar='SECONDS',
     help='If a lock is held for longer than this threshold we log a warning',
 )
@@ -129,10 +129,7 @@ class LockFile(object):
         if self.locktime:
             ts = datetime.datetime.now().timestamp()
             duration = ts - self.locktime
-            if (
-                duration
-                >= config.config['lockfile_held_duration_warning_threshold_sec']
-            ):
+            if duration >= config.config['lockfile_held_duration_warning_threshold_sec']:
                 str_duration = datetime_utils.describe_duration_briefly(duration)
                 msg = f'Held {self.lockfile} for {str_duration}'
                 logger.warning(msg)