Skip to content

Fix lava-worker not awaiting check coroutine during cancel handler

Igor Ponomarev requested to merge lava-worker-fix-no-job-check-on-cancel into master

In 2569acf3 the check() became coroutine but the asyncio.CancelledError handler in main() was not updated to use await.

Add the missing await and set the default loop executor earlier because the check() uses the executor.

Found with mypy:

lava_dispatcher/worker.py:790: error: Value of type "Coroutine[Any, Any, None]" must be used  [unused-coroutine]
lava_dispatcher/worker.py:790: note: Are you missing an await?

Merge request reports

Loading