diff --git a/locking_tests/locking_tests.py b/locking_tests/locking_tests.py index cb33f08..c4f2953 100755 --- a/locking_tests/locking_tests.py +++ b/locking_tests/locking_tests.py @@ -12,9 +12,12 @@ from yacman import write_lock import logging + _LOGGER = logging.getLogger() # root logger stream = logging.StreamHandler(sys.stdout) -fmt = logging.Formatter("%(levelname)s %(asctime)s | %(name)s:%(module)s:%(lineno)d > %(message)s ") +fmt = logging.Formatter( + "%(levelname)s %(asctime)s | %(name)s:%(module)s:%(lineno)d > %(message)s " +) stream.setFormatter(fmt) _LOGGER.setLevel(os.environ.get("LOGLEVEL", "DEBUG")) _LOGGER.addHandler(stream) @@ -31,7 +34,9 @@ with write_lock(ym) as locked_y: locked_y.rebase() random_wait_time = random() - _LOGGER.debug(f"Sleeping for {random_wait_time} to simulate process {args.id} updating the file") + _LOGGER.debug( + f"Sleeping for {random_wait_time} to simulate process {args.id} updating the file" + ) sleep(random_wait_time) locked_y.update({args.id: 1}) _LOGGER.debug(f"Writing to file for process {args.id}.")