Skip to content

Commit

Permalink
Add docs for on_failure
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
  • Loading branch information
keshav-space committed Nov 13, 2024
1 parent aa7d4fd commit 6c5dd0e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/source/tutorial_add_importer_pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,14 @@ version management from `univers <https://github.com/aboutcode-org/univers>`_.
**advisories_count** should never be directly added in steps.


.. attention::

Implement ``on_failure`` to handle cleanup in case of pipeline failure.
Cleanup of downloaded archives or cloned repos is necessary to avoid potential resource leakage.

.. note::

| Use ``make valid`` to format your code using black and isort automatically.
| Use ``make valid`` to format your new code using black and isort automatically.
| Use ``make check`` to check for formatting errors.
Register the Importer Pipeline
Expand Down
5 changes: 5 additions & 0 deletions docs/source/tutorial_add_improver_pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ methods.
self.log(f"Successfully flagged {ghost_package_count:,d} ghost Packages")
.. attention::

Implement ``on_failure`` to handle cleanup in case of pipeline failure.
Cleanup of downloaded archives or cloned repos is necessary to avoid potential resource leakage.

.. note::

| Use ``make valid`` to format your new code using black and isort automatically.
Expand Down

0 comments on commit 6c5dd0e

Please sign in to comment.