feat: Add configurable cache keepalive delay and pings option

This commit is contained in:
Paul Gauthier 2025-02-09 15:22:19 -08:00 committed by Paul Gauthier (aider)
parent 674eb109c2
commit e2dbfdc537
2 changed files with 2 additions and 1 deletions

View file

@ -1207,6 +1207,7 @@ class Coder:
return return
delay = 5 * 60 - 5 delay = 5 * 60 - 5
delay = float(os.environ.get("AIDER_CACHE_KEEPALIVE_DELAY", delay))
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

View file

@ -1060,7 +1060,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
while True: while True:
try: try:
coder.ok_to_warm_cache = True coder.ok_to_warm_cache = bool(args.cache_keepalive_pings)
coder.run() coder.run()
analytics.event("exit", reason="Completed main CLI coder.run") analytics.event("exit", reason="Completed main CLI coder.run")
return return