Skip to content

Commit

Permalink
[ServiceBus] Removed async from sync op (#28761)
Browse files Browse the repository at this point in the history
* Removed async from sync op

* Removed awaits

* Updated changelog
  • Loading branch information
annatisch authored Mar 8, 2023
1 parent f5fcf6c commit a11504e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions sdk/servicebus/azure-servicebus/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Breaking Changes

### Bugs Fixed
- Fixed a bug where asynchronous method to add distributed tracing attributes was not being awaited (Issue #28738).

### Other Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ async def _mgmt_request_response_with_retry(
**kwargs
)

async def _add_span_request_attributes(self, span):
def _add_span_request_attributes(self, span):
return BaseHandlerSync._add_span_request_attributes( # pylint: disable=protected-access
self, span
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ async def schedule_messages(
schedule_time_utc, send_span, *obj_messages
)
if send_span:
await self._add_span_request_attributes(send_span)
self._add_span_request_attributes(send_span)
return await self._mgmt_request_response_with_retry(
REQUEST_RESPONSE_SCHEDULE_MESSAGE_OPERATION,
request_body,
Expand Down Expand Up @@ -375,7 +375,7 @@ async def send_messages(
return # Short circuit noop if an empty list or batch is provided.

if send_span:
await self._add_span_request_attributes(send_span)
self._add_span_request_attributes(send_span)

await self._do_retryable_operation(
self._send,
Expand Down

0 comments on commit a11504e

Please sign in to comment.