Skip to content

Commit

Permalink
Merge pull request #3095 from ramikg/simplify-workertmp-notify
Browse files Browse the repository at this point in the history
Use `utime` instead of `fchmod` in `WorkerTmp.notify`
  • Loading branch information
benoitc authored Nov 18, 2023
2 parents 02d3dd8 + 0dd6b63 commit 571b6ff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions gunicorn/workers/workertmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@ def __init__(self, cfg):
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
Expand Down

0 comments on commit 571b6ff

Please sign in to comment.