mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
fix: Modify cache warming logic with debug dump statements
This commit is contained in:
parent
53586d95d0
commit
3b5024749f
1 changed files with 4 additions and 1 deletions
|
@ -1196,12 +1196,14 @@ class Coder:
|
||||||
return chunks
|
return chunks
|
||||||
|
|
||||||
def warm_cache(self, chunks):
|
def warm_cache(self, chunks):
|
||||||
|
dump(self.add_cache_headers)
|
||||||
|
dump(self.num_cache_warming_pings)
|
||||||
if not self.add_cache_headers:
|
if not self.add_cache_headers:
|
||||||
return
|
return
|
||||||
if not self.num_cache_warming_pings:
|
if not self.num_cache_warming_pings:
|
||||||
return
|
return
|
||||||
|
|
||||||
delay = 5 * 60 - 5
|
delay = 5 #* 60 - 5
|
||||||
self.next_cache_warm = time.time() + delay
|
self.next_cache_warm = time.time() + delay
|
||||||
self.warming_pings_left = self.num_cache_warming_pings
|
self.warming_pings_left = self.num_cache_warming_pings
|
||||||
self.cache_warming_chunks = chunks
|
self.cache_warming_chunks = chunks
|
||||||
|
@ -1211,6 +1213,7 @@ class Coder:
|
||||||
|
|
||||||
def warm_cache_worker():
|
def warm_cache_worker():
|
||||||
while True:
|
while True:
|
||||||
|
dump(self.warming_pings_left)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
if self.warming_pings_left <= 0:
|
if self.warming_pings_left <= 0:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue