Skip to content

Commit

Permalink
[metricsadvisor] Update async samples to use asyncio.run() (Azure#22269)
Browse files Browse the repository at this point in the history
  • Loading branch information
sammiee5311 authored Jan 4, 2022
1 parent 936ec6c commit dcfedb8
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,5 +325,4 @@ async def main():
await sample_delete_alert_config_async(alert_config.id)

if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,4 @@ async def main():


if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,4 @@ async def main():


if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,4 @@ async def main():
await sample_delete_datasource_credential_async(credential.id)

if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -264,5 +264,4 @@ async def main():


if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,4 @@ async def main():


if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,4 @@ async def main():


if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,4 @@ async def main():
await sample_list_incidents_for_alert_async()

if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())

asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,4 @@ async def main():


if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
asyncio.run(main())
Original file line number Diff line number Diff line change
Expand Up @@ -202,5 +202,4 @@ async def main():
await sample_list_metric_enrichment_status_async()

if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
asyncio.run(main())

0 comments on commit dcfedb8

Please sign in to comment.