File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -495,7 +495,7 @@ def murder_workers(self):
495
495
workers = list (self .WORKERS .items ())
496
496
for (pid , worker ) in workers :
497
497
try :
498
- if time .time () - worker .tmp .last_update () <= self .timeout :
498
+ if time .monotonic () - worker .tmp .last_update () <= self .timeout :
499
499
continue
500
500
except (OSError , ValueError ):
501
501
continue
Original file line number Diff line number Diff line change 4
4
# See the NOTICE for more information.
5
5
6
6
import os
7
+ import time
7
8
import platform
8
9
import tempfile
9
10
@@ -40,10 +41,11 @@ def __init__(self, cfg):
40
41
raise
41
42
42
43
def notify (self ):
43
- os .utime (self ._tmp .fileno ())
44
+ new_time = time .monotonic ()
45
+ os .utime (self ._tmp .fileno (), (new_time , new_time ))
44
46
45
47
def last_update (self ):
46
- return os .fstat (self ._tmp .fileno ()).st_ctime
48
+ return os .fstat (self ._tmp .fileno ()).st_mtime
47
49
48
50
def fileno (self ):
49
51
return self ._tmp .fileno ()
You can’t perform that action at this time.
0 commit comments