티스토리 뷰

728x90
async def ws(f):
    pass


async def callback(*args):
    pass


async def create():
    tasks = [
        asyncio.create_task(
            ws(callback)
        )
    ]

    await asyncio.wait(tasks)


if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)

    loop.run_until_complete(create())

https://stackoverflow.com/questions/73361664/asyncio-get-event-loop-deprecationwarning-there-is-no-current-event-loop

 

asyncio.get_event_loop(): DeprecationWarning: There is no current event loop

I'm building an SMTP server with aiosmtpd and used the examples as a base to build from. Below is the code snippet for the entry point to the program. if __name__ == '__main__': loop = asyncio.

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[aws] AWS: 소스 IP를 바탕으로 AWS에 대한 액세스 거부  (0) 2023.08.06
[bitbucket] pipeline & oidc  (0) 2023.08.05
[aws] aws sts get-caller-identity  (0) 2023.08.05
[github] review-assign-action  (0) 2023.08.05
[datadog] RDS  (0) 2023.08.05
댓글