fix(token_manager): race condition for file stat
Python Lint CI / ruff-format-check (push) Successful in 9m32s
Python Lint CI / ruff (push) Successful in 9m33s
Python Lint CI / ty (push) Successful in 9m18s
Docker CI / docker-build (push) Successful in 10m35s
Python Test CI / coverage (push) Successful in 2m20s
Python Lint CI / ruff-format-check (push) Successful in 9m32s
Python Lint CI / ruff (push) Successful in 9m33s
Python Lint CI / ty (push) Successful in 9m18s
Docker CI / docker-build (push) Successful in 10m35s
Python Test CI / coverage (push) Successful in 2m20s
This commit is contained in:
@@ -67,10 +67,11 @@ class TokenManager:
|
||||
def detect_file_change(self) -> bool:
|
||||
if (
|
||||
self.tokens_file.exists()
|
||||
and self.tokens_file.stat().st_mtime != self.last_file_change
|
||||
and (file_change := self.tokens_file.stat().st_mtime)
|
||||
!= self.last_file_change
|
||||
):
|
||||
self.logger.debug("Detected change: %s", self.tokens_file)
|
||||
self.last_file_change = self.tokens_file.stat().st_mtime
|
||||
self.last_file_change = file_change
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user