章丙辰
章丙辰
run()方法会连接到网络并且爬取数据,5秒耗时已经把爬取过程包含进去了,主要的耗时应该在网络IO部分。
The branch_id Field should be set in the model which "table=True" ``` class Model(SQLModel, table=True): branch_id: Optional[int] = Field( sa_column=Column("branch_id", Integer, ForeignKey("branch.id")), ) ```
add `default` kwargs for Field might solve this problem `Field(default="redis://localhost:6379")` https://docs.pydantic.dev/latest/integrations/visual_studio_code/#adding-a-default-with-field
> And how would it be for the settings that I don't want a default? I want to make it mandatory. `Field(...)`