Skip to content

Commit

Permalink
Merge pull request #13 from Azure-Samples/comment-warning-unclosed-se…
Browse files Browse the repository at this point in the history
…ssion

Comment about unclosed session and fix title in readmes
  • Loading branch information
00Kai0 authored Jun 4, 2020
2 parents f55ab0a + 28b1d23 commit 1cb9ace
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion samples/appconfiguration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "These code samples will show you how to manage Appconfiguration us
urlFragment: appconfiguration
---

# Python Management SDK Samples
# Getting started - Managing Appconfiguration using Azure Python SDK

These code samples will show you how to manage Appconfiguration using Azure SDK for Python.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ async def main():
)
await async_poller.result()

# close event loop
# [Warning] All clients and credentials need to be closed.
# link: https://github.com/Azure/azure-sdk-for-python/issues/8990
await appconfig_client.close()
await resource_client.close()
await credential.close()
Expand Down
2 changes: 1 addition & 1 deletion samples/compute/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "These code samples will show you how to manage Compute using Azure
urlFragment: compute
---

# Python Management SDK Samples
# Getting started - Managing Compute using Azure Python SDK

These code samples will show you how to manage Compute using Azure SDK for Python.

Expand Down
2 changes: 2 additions & 0 deletions samples/compute/aio/manage_virtual_machine_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ async def main():
)
await async_poller.result()

# [Warning] All clients and credentials need to be closed.
# link: https://github.com/Azure/azure-sdk-for-python/issues/8990
await resource_client.close()
await compute_client.close()
await network_client.close()
Expand Down
2 changes: 1 addition & 1 deletion samples/eventhub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "These code samples will show you how to manage Eventhub using Azur
urlFragment: eventhub
---

# Python Management SDK Samples
# Getting started - Managing Eventhub using Azure Python SDK

These code samples will show you how to manage Eventhub using Azure SDK for Python.

Expand Down
3 changes: 2 additions & 1 deletion samples/eventhub/aio/manage_namespace_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ async def main():
)
await async_poller.result()

# Close event loop
# [Warning] All clients and credentials need to be closed.
# link: https://github.com/Azure/azure-sdk-for-python/issues/8990
await eventhub_client.close()
await resource_client.close()
await credential.close()
Expand Down
2 changes: 2 additions & 0 deletions samples/keyvault/aio/manage_vault_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ async def main():
)
await async_poller.result()

# [Warning] All clients and credentials need to be closed.
# link: https://github.com/Azure/azure-sdk-for-python/issues/8990
await keyvault_client.close()
await resource_client.close()
await credential.close()
Expand Down
2 changes: 1 addition & 1 deletion samples/monitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "These code samples will show you how to manage Monitor using Azure
urlFragment: monitor
---

# Python Monitor SDK Samples
# Getting started - Managing Monitor using Azure Python SDK

These code samples will show you how to manage Monitor using Azure SDK for Python.

Expand Down
2 changes: 2 additions & 0 deletions samples/monitor/aio/manage_log_profile_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ async def main():
)
await async_poller.result()

# [Warning] All clients and credentials need to be closed.
# link: https://github.com/Azure/azure-sdk-for-python/issues/8990
await monitor_client.close()
await resource_client.close()
await storage_client.close()
Expand Down
2 changes: 2 additions & 0 deletions samples/network/aio/manage_virtual_network_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ async def main():
)
await async_poller.result()

# [Warning] All clients and credentials need to be closed.
# link: https://github.com/Azure/azure-sdk-for-python/issues/8990
await network_client.close()
await resource_client.close()
await credential.close()
Expand Down
2 changes: 2 additions & 0 deletions samples/resources/aio/manage_resource_group_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ async def main():
await async_poller.result()
print("Delete resource group.\n")

# [Warning] All clients and credentials need to be closed.
# link: https://github.com/Azure/azure-sdk-for-python/issues/8990
await resource_client.close()
await credential.close()

Expand Down
2 changes: 2 additions & 0 deletions samples/storage/aio/manage_storage_account_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ async def main():
)
await async_poller.result()

# [Warning] All clients and credentials need to be closed.
# link: https://github.com/Azure/azure-sdk-for-python/issues/8990
await storage_client.close()
await resource_client.close()
await credential.close()
Expand Down

0 comments on commit 1cb9ace

Please sign in to comment.