An open API service indexing awesome lists of open source software.

https://github.com/mobiletelesystems/evacuator

Catch exception and exit with specific exit code
https://github.com/mobiletelesystems/evacuator

airflow skip-dag

Last synced: 6 months ago
JSON representation

Catch exception and exit with specific exit code

Awesome Lists containing this project

README

          

.. title

Evacuator
=========

|Repo Status| |PyPI Latest Release| |PyPI License| |PyPI Python Version| |PyPI Downloads|
|Documentation| |CI Status| |Test Coverage| |pre-commit.ci Status|

.. |Repo Status| image:: https://www.repostatus.org/badges/latest/active.svg
:alt: Repo status - Active
:target: https://github.com/MobileTeleSystems/evacuator
.. |PyPI Latest Release| image:: https://img.shields.io/pypi/v/evacuator
:alt: PyPI - Latest Release
:target: https://pypi.org/project/evacuator/
.. |PyPI License| image:: https://img.shields.io/pypi/l/evacuator.svg
:alt: PyPI - License
:target: https://github.com/MobileTeleSystems/evacuator/blob/develop/LICENSE.txt
.. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/evacuator.svg
:alt: PyPI - Python Version
:target: https://pypi.org/project/evacuator/
.. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/evacuator
:alt: PyPI - Downloads
:target: https://pypi.org/project/evacuator/
.. |Documentation| image:: https://readthedocs.org/projects/evacuator/badge/?version=stable
:alt: Documentation - ReadTheDocs
:target: https://evacuator.readthedocs.io/
.. |CI Status| image:: https://github.com/MobileTeleSystems/evacuator/workflows/Tests/badge.svg
:alt: Github Actions - latest CI build status
:target: https://github.com/MobileTeleSystems/evacuator/actions
.. |Test Coverage| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/
MTSOnGithub/03e73a82ecc4709934540ce8201cc3b4/raw/evacuator_badge.json
:target: https://github.com/MobileTeleSystems/evacuator/actions
.. |pre-commit.ci Status| image:: https://results.pre-commit.ci/badge/github/MobileTeleSystems/evacuator/develop.svg
:alt: pre-commit.ci - status
:target: https://results.pre-commit.ci/latest/github/MobileTeleSystems/evacuator/develop

What is Evacuator?
------------------

Decorator/context manager designed to catch a certain exception and exit with specific exit code.

Designed to be used in `Apache Airflow `__ with:
* `BashOperator `_ (`airflow>2.1`)
* `PythonVirtualenvOperator `_ (`airflow>=2.6`)
* `ExternalPythonOperator `_ (`airflow>=2.6`)
* `DockerOperator `_ (`apache-airflow-providers-docker>=3.5`)
* `KubernetesPodOperator `_ (`apache-airflow-providers-cncf-kubernetes>=6.1`)
* `SSHOperator `_ (`apache-airflow-providers-ssh>=3.10`)
* any other operator support skipping task when process is exited with some specific exit code (``skip_on_exit_code`` option)

.. installation

How to install
---------------

.. code:: bash

pip install evacuator

.. documentation

Documentation
-------------

See https://evacuator.readthedocs.io/