GiorgioV commited on
Commit
b3a1b8a
·
verified ·
1 Parent(s): 2739cae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -173,7 +173,7 @@ def cleanup_old_files():
173
  # Удаляем директории старше 1 часа
174
  stat = item.stat()
175
  dir_age = current_time - stat.st_ctime
176
- if dir_age > 3600: # 1 час
177
  shutil.rmtree(item, ignore_errors=True)
178
  logger.info(f"Cleaned up old directory: {item}")
179
  except Exception as e:
@@ -231,7 +231,7 @@ if __name__ == "__main__":
231
  def cleanup_thread():
232
  while True:
233
  cleanup_old_files()
234
- time.sleep(3600) # Каждый час
235
 
236
  cleanup_thread = threading.Thread(target=cleanup_thread, daemon=True)
237
  cleanup_thread.start()
 
173
  # Удаляем директории старше 1 часа
174
  stat = item.stat()
175
  dir_age = current_time - stat.st_ctime
176
+ if dir_age > 600:
177
  shutil.rmtree(item, ignore_errors=True)
178
  logger.info(f"Cleaned up old directory: {item}")
179
  except Exception as e:
 
231
  def cleanup_thread():
232
  while True:
233
  cleanup_old_files()
234
+ time.sleep(600) # Каждый час
235
 
236
  cleanup_thread = threading.Thread(target=cleanup_thread, daemon=True)
237
  cleanup_thread.start()