def clean_db(): Fruit.query().delete() Fruit.commit()
def init_cache(): fruits: List[Fruit] = Fruit.query().all() for fruit in fruits: REDIS.set(fruit.name, f"{fruit.count}")
def init_cache(): fruits: List[Fruit] = Fruit.query().all() for fruit in fruits: REDIS.set(fruit.name, f"{fruit.count}") # Intended to trigger server error REDIS.set("error", "error")