Merge pull request #3095 from ramikg/simplify-workertmp-notify

Use `utime` instead of `fchmod` in `WorkerTmp.notify`
This commit is contained in:
Benoit Chesneau 2023-11-18 23:14:29 +01:00 committed by GitHub
commit 571b6fff46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,11 +39,8 @@ class WorkerTmp(object):
os.close(fd)
raise
self.spinner = 0
def notify(self):
self.spinner = (self.spinner + 1) % 2
os.fchmod(self._tmp.fileno(), self.spinner)
os.utime(self._tmp.fileno())
def last_update(self):
return os.fstat(self._tmp.fileno()).st_ctime