More troubleshooting and setup tips, and some improvements to flagship Week 8 project

This commit is contained in:
Edward Donner
2024-10-20 15:24:40 -04:00
parent ced435c95a
commit 0a64893188
10 changed files with 247 additions and 187 deletions

10
week8/keep_warm.py Normal file
View File

@@ -0,0 +1,10 @@
import time
import modal
from datetime import datetime
Pricer = modal.Cls.lookup("pricer-service", "Pricer")
pricer = Pricer()
while True:
reply = pricer.wake_up.remote()
print(f"{datetime.now()}: {reply}")
time.sleep(30)