feat: add async_mode param to AsyncERClient.delete_source#51
Merged
chrisdoehring merged 4 commits intomainfrom Mar 20, 2026
Merged
feat: add async_mode param to AsyncERClient.delete_source#51chrisdoehring merged 4 commits intomainfrom
chrisdoehring merged 4 commits intomainfrom
Conversation
Passes ?async=true query param when async_mode=True (the default). Source deletion can be time-consuming on the ER side, so async is the expected behavior for callers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
erclient/client.py
Outdated
| return await self._delete(f'subject/{subject_id}/') | ||
|
|
||
| async def delete_source(self, source_id): | ||
| async def delete_source(self, source_id, async_mode: bool = True): |
Contributor
There was a problem hiding this comment.
We probably want this to be sync by default.
Suggested change
| async def delete_source(self, source_id, async_mode: bool = True): | |
| async def delete_source(self, source_id, async_mode: bool = False): |
chrisdoehring
requested changes
Mar 18, 2026
Contributor
chrisdoehring
left a comment
There was a problem hiding this comment.
@victorlujanearthranger I think we should probably make the delete synchronous by default. Let me know what you think about switching that.
Per code review feedback, synchronous should be the default behavior. Callers that want async deletion can explicitly pass async_mode=True. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Fixed — changed the default to synchronous (). Callers that want async behavior can still pass explicitly. |
chrisdoehring
previously approved these changes
Mar 20, 2026
chrisdoehring
previously approved these changes
Mar 20, 2026
The merge-base changed after approval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
async_mode: bool = Trueparameter toAsyncERClient.delete_sourceTrue(default), passes?async=trueto EarthRanger so deletions are processed asynchronouslyTest plan
delete_sourcewithoutasync_mode— verify request includes?async=true(default)delete_sourcewithasync_mode=False— verify request has noasyncparam🤖 Generated with Claude Code