Skip to content

Commit

Permalink
```
Browse files Browse the repository at this point in the history
refactor(profile): remove duplicate split function and import it

Move the `_split_by_index` function to a new utility module and import
it in `profile.py`. This change reduces code duplication and enhances
code organization.

feat(session): add bulk session storage with error handling

Implement `store_bulk_sessions` function to batch process and store
sessions in Elastic. Includes error handling to remove erroneous
sessions from the cache, improving robustness.

refactor(session): update deferred execution to new bulk function

Modify deferred execution in `store_single_session` to use the new
`store_bulk_sessions` function, ensuring consistency in session
processing.

chore(session): add TODO to remove unused split function

Add TODO comments to `_split_by_index` and `store_bulk_session`
functions in `session.py` indicating removal by 2025-06-01 in version
1.1.x, as they are currently unused.

feat(session_cache): implement session cache deletion

Add `delete_session_cache` function to remove sessions from the cache
by session ID and context, providing better cache management.
```
  • Loading branch information
atompie committed Oct 21, 2024
1 parent 4002af2 commit 93789bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def save_sessions_in_db(sessions: List[Session]) -> BulkInsertResult:
return await session_db.save_sessions(sessions)

# TODO remove after 2025-06-01, remove in version 1.1.x
# Not used but some
# Not used but some queue may still use it. Version 1.0.4 does not use it.
async def store_bulk_session(sessions: List[Session], context: Context):
with ServerContext(context):
# Group sessions by index and iterate
Expand Down

0 comments on commit 93789bb

Please sign in to comment.