Skip to content

Commit

Permalink
Use utime instead of fchmod in WorkerTmp.notify
Browse files Browse the repository at this point in the history
  • Loading branch information
ramikg authored Nov 14, 2023
1 parent 02d3dd8 commit 0dd6b63
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 0dd6b63

Please sign in to comment.