Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

34 get producer list cannot be called from thread #35

Merged

Conversation

FabienDanieau
Copy link
Contributor

I changed

    loop = asyncio.get_event_loop()
    return loop.run_until_complete(get_list())

to return asyncio.run(get_list())

since I am calling the function from a thread (with no async loop).
The example src/example/get_producer_list.py is fixed accordingly (and it was also not working)

Is that ok? or do we want to call get_producer_list in utils from a async function? So the loop would already exist and async.run would not work

@FabienDanieau FabienDanieau linked an issue Jan 2, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Jan 2, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
3 3 100% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: b4651de by action🐍

@pierre-rouanet
Copy link
Member

Hum... I may have fixed that the same way you did locally and never pushed the commit...

Thanks for doing it :)

@pierre-rouanet pierre-rouanet merged commit e9d1745 into develop Jan 3, 2024
5 checks passed
@pierre-rouanet pierre-rouanet deleted the 34-get_producer_list-cannot-be-called-from-thread branch January 3, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_producer_list cannot be called from thread
2 participants