Skip to content

CancelledError does not cancel 'mode.Worker' #51

Description

@nikitagashkov

Checklist

  • I have included information about relevant versions
  • I have verified that the issue persists when using the master branch of Mode.

Steps to reproduce

Have a Service with a canceled background task wrapped into Worker:

class Api(mode.Service):
    @mode.Service.task
    def main(self) -> None:
        raise asyncio.CancelledError()

if __name__ == '__main__':
    mode.Worker(Api()).execute_from_command_line()

Expected behavior

A task's CancelledError can be propagated to the worker.

Actual behavior

An application seems stuck and unresponsive.

Full traceback

Paste the full traceback (if there is any)

Versions

  • Python version: 3.7.5
  • Mode version: 4.1.2
  • Operating system: Debian-based official Python 3.7 image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions