Skip to content

Commit

Permalink
fix: commit the session
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueRou committed Nov 29, 2024
1 parent e49a897 commit 73a0da6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/app/maimai/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,5 @@ async def crawl_async(cookies: Cookies, username: str, session: Session) -> list
tasks = [crawl_diff(diff, cookies, accounts, session) for diff in [0, 1, 2, 3, 4]]
results = await asyncio.gather(*tasks, return_exceptions=True)
results = [result for result in results if not isinstance(result, RetryError)]
session.commit()
return functools.reduce(operator.concat, results, [])

0 comments on commit 73a0da6

Please sign in to comment.