ChandimaPrabath commited on
Commit
f3784c6
·
1 Parent(s): 61c1719
Files changed (1) hide show
  1. LoadBalancer.py +2 -2
LoadBalancer.py CHANGED
@@ -36,7 +36,7 @@ class LoadBalancer:
36
  os.makedirs(self.CACHE_DIR)
37
 
38
  # Initialize file structure and prefetching
39
- self.file_structure = self.indexer()
40
  self.start_prefetching()
41
 
42
  # Start polling and file checking in separate threads
@@ -93,7 +93,7 @@ class LoadBalancer:
93
  """Periodically check for updates and trigger prefetching if new content is detected."""
94
  while not self.stop_event.is_set():
95
  time.sleep(120) # Wait for 2 minutes
96
- current_file_structure = self.indexer()
97
  if current_file_structure != self.previous_file_structure:
98
  # Trigger prefetching using FastAPI background tasks
99
  background_tasks = self.start_prefetching()
 
36
  os.makedirs(self.CACHE_DIR)
37
 
38
  # Initialize file structure and prefetching
39
+ self.file_structure = indexer()
40
  self.start_prefetching()
41
 
42
  # Start polling and file checking in separate threads
 
93
  """Periodically check for updates and trigger prefetching if new content is detected."""
94
  while not self.stop_event.is_set():
95
  time.sleep(120) # Wait for 2 minutes
96
+ current_file_structure = indexer()
97
  if current_file_structure != self.previous_file_structure:
98
  # Trigger prefetching using FastAPI background tasks
99
  background_tasks = self.start_prefetching()