mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
minor on batch portfolio delete
This commit is contained in:
parent
5a9e018b19
commit
4f6a9fdc07
1 changed files with 2 additions and 2 deletions
|
|
@ -231,12 +231,12 @@ def upload_recommendations(session: Session, recommendations_to_upload, property
|
|||
# session.commit()
|
||||
|
||||
|
||||
def chunked(iterable, size=500):
|
||||
def chunked(iterable, size=100):
|
||||
for i in range(0, len(iterable), size):
|
||||
yield iterable[i:i + size]
|
||||
|
||||
|
||||
def clear_portfolio(session: Session, portfolio_id: int, batch_size=500):
|
||||
def clear_portfolio(session: Session, portfolio_id: int, batch_size=100):
|
||||
# --------------------------
|
||||
# Collect IDs up-front
|
||||
# --------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue