Skip to content

Commit b2b701b

Browse files
authored
[Storage] Fix listener to use the target data blob client over the host (#50431)
* Fix listner to use the target data blob client over the host * Removing unneccessary variable * Changelog
1 parent 11172fc commit b2b701b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Breaking Changes
88

99
### Bugs Fixed
10+
- Fixed bug where the scan will continue scanning AzureWebJobsStorage even when configuring a target storage account
1011

1112
### Other Changes
1213

sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Listeners/BlobListenerFactory.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ public async Task<IListener> CreateAsync(CancellationToken cancellationToken)
8787
{
8888
// Note that these clients are intentionally for the storage account rather than for the dashboard account.
8989
// We use the storage, not dashboard, account for the blob receipt container and blob trigger queues.
90-
var primaryBlobClient = _hostBlobServiceClient;
91-
9290
// Important: We're using the storage account of the function target here, which is the account that the
9391
// function the listener is for is targeting. This is the account that will be used
9492
// to read the trigger blob.
@@ -107,7 +105,7 @@ public async Task<IListener> CreateAsync(CancellationToken cancellationToken)
107105
new SharedBlobListenerFactory(hostId, _hostBlobServiceClient, _exceptionHandler, _blobWrittenWatcherSetter, _loggerFactory.CreateLogger<BlobListener>()));
108106

109107
// Register the blob container we wish to monitor with the shared blob listener.
110-
await RegisterWithSharedBlobListenerAsync(hostId, sharedBlobListener, primaryBlobClient,
108+
await RegisterWithSharedBlobListenerAsync(hostId, sharedBlobListener, targetBlobClient,
111109
blobTriggerQueueWriter, cancellationToken).ConfigureAwait(false);
112110
}
113111

0 commit comments

Comments
 (0)