Uh oh!
There was an error while loading. Please reload this page.
[update] modify the RefreshAgents interface to use batch operations; - #922
[update] modify the RefreshAgents interface to use batch operations;#922zfchai wants to merge 1 commit into
Conversation
zfchai
commented
Mar 7, 2025
- Add batch method
- BulkInsertAgentsAsync
- BulkInsertUserAgentsAsync
- DeleteAgentsAsync
- DeleteAgentsAsync(List agentIds)
- BulkInsertAgentTasksAsync
- Update method
- RefreshAgents
| } | ||
| if (!refreshedAgents.IsNullOrEmpty()) | ||
| if (agents.Count > 0) |
There was a problem hiding this comment.
Please ensure that when performing batch operations, the data operations are carried out within a single transaction in MongoDB to prevent other agents from failing to insert when one agent insertion encounters an exception.
There was a problem hiding this comment.
- IsNullOrEmpty is a built-in extension method.
- Okay, batch operations can adjust transaction support.
There was a problem hiding this comment.
The IBotSharpRepository currently does not provide transaction session objects.
If you consider multiple database support, this session object may not be compatible.
Oceania2018
commented
Mar 11, 2025
Thanks for you contribution! |