diff --git a/.github/workflows/build_and_publish_docs.yml b/.github/workflows/build_and_publish_docs.yml index c4a1b4802..34ebee3be 100644 --- a/.github/workflows/build_and_publish_docs.yml +++ b/.github/workflows/build_and_publish_docs.yml @@ -4,7 +4,7 @@ on: push: branches: - dev - - test/** + - docs/** pull_request_target: branches: - dev diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 27e8108d7..075392921 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -3,8 +3,8 @@ name: codestyle on: push: branches: - - dev - - test/** + - dev + - test/** pull_request: branches: - dev diff --git a/dff/pipeline/pipeline/pipeline.py b/dff/pipeline/pipeline/pipeline.py index c65ac9e7a..41365b42a 100644 --- a/dff/pipeline/pipeline/pipeline.py +++ b/dff/pipeline/pipeline/pipeline.py @@ -14,6 +14,7 @@ to structure and manage the messages processing flow. """ import asyncio +import contextlib import logging from typing import Union, List, Dict, Optional, Hashable, Callable @@ -361,7 +362,10 @@ def __call__(self, request: Message, ctx_id: Hashable) -> Context: :param ctx_id: Current dialog id. :return: Dialog `Context`. """ - return asyncio.run(self._run_pipeline(request, ctx_id)) + try: + return asyncio.run(self._run_pipeline(request, ctx_id)) + except KeyboardInterrupt: + return Context() @property def script(self) -> Script: diff --git a/makefile b/makefile index 4eee959e3..291aed71e 100644 --- a/makefile +++ b/makefile @@ -100,3 +100,5 @@ clean: clean_docs rm -f .coverage rm -rf build .PHONY: clean + +# TODO: do not merge before poetry is ready!!