marcosschroh / cookiecutter-faust

A Cookiecutter template for creating Faust projects quickly.
MIT License
70 stars 17 forks source link

" got Future <Future pending> attached to a different loop " Error #67

Open qivhou opened 1 year ago

qivhou commented 1 year ago

Describe the bug A clear and concise description of what the bug is. Once using scripts/run to start app, PYTHONPATH=app venv/bin/faust -A app worker --web-port=6066 actually executed, I'll get following error

RuntimeError: Task <Task pending name='Task-42' coro=<Event.wait() running at /root/miniconda3/envs/faust/lib/python3.8/asyncio/locks.py:309> cb=[_wait.<locals>._on_completion() at /root/miniconda3/envs/faust/lib/python3.8/asyncio/tasks.py:518]> got Future <Future pending> attached to a different loop

But if I use the local faust to run PYTHONPATH=app faust -A app worker --web-port=6066, everything is OK

I found this issue when I build my Docker Image, it happened in Python3.7 and Python3.8

seems it's related with asyncio, but I only found some clues on https://faust.readthedocs.io/en/latest/userguide/testing.html

Any idea on it ? Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.