Skip to content

Commit 6c5dd0e

Browse files
committed
Add docs for on_failure
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent aa7d4fd commit 6c5dd0e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/source/tutorial_add_importer_pipeline.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,14 @@ version management from `univers <https://github.com/aboutcode-org/univers>`_.
298298
**advisories_count** should never be directly added in steps.
299299

300300

301+
.. attention::
302+
303+
Implement ``on_failure`` to handle cleanup in case of pipeline failure.
304+
Cleanup of downloaded archives or cloned repos is necessary to avoid potential resource leakage.
301305

302306
.. note::
303307

304-
| Use ``make valid`` to format your code using black and isort automatically.
308+
| Use ``make valid`` to format your new code using black and isort automatically.
305309
| Use ``make check`` to check for formatting errors.
306310
307311
Register the Importer Pipeline

docs/source/tutorial_add_improver_pipeline.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ methods.
187187
self.log(f"Successfully flagged {ghost_package_count:,d} ghost Packages")
188188
189189
190+
.. attention::
191+
192+
Implement ``on_failure`` to handle cleanup in case of pipeline failure.
193+
Cleanup of downloaded archives or cloned repos is necessary to avoid potential resource leakage.
194+
190195
.. note::
191196

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

0 commit comments

Comments
 (0)