Skip reload on attribute changes
This commit is contained in:
parent
314c8b22db
commit
149278abd0
1 changed files with 3 additions and 0 deletions
|
@ -44,6 +44,9 @@ class DebugReloader:
|
|||
self.last_chaged = time.time()
|
||||
time_modified = os.path.getmtime(path)
|
||||
self.log.debug("File changed: %s reloading source code (modified %.3fs ago)" % (evt, time.time() - time_modified))
|
||||
if time.time() - time_modified > 5: # Probably it's just an attribute change, ignore it
|
||||
return False
|
||||
|
||||
time.sleep(0.1) # Wait for lock release
|
||||
for callback in self.callbacks:
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue