Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: custom success message for ExtractionPipelineRun #276

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cognite/extractorutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
Cognite extractor utils is a Python package that simplifies the development of new extractors.
"""

__version__ = "6.1.1"
__version__ = "6.1.2"
from .base import Extractor
4 changes: 3 additions & 1 deletion cognite/extractorutils/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def __init__(
handle_interrupts: bool = True,
reload_config_interval: Optional[int] = 300,
reload_config_action: ReloadConfigAction = ReloadConfigAction.DO_NOTHING,
success_message: str = "Successful shutdown",
):
self.name = name
self.description = description
Expand All @@ -102,6 +103,7 @@ def __init__(
self.handle_interrupts = handle_interrupts
self.reload_config_interval = reload_config_interval
self.reload_config_action = reload_config_action
self.success_message = success_message

self.started = False
self.configured_logger = False
Expand Down Expand Up @@ -208,7 +210,7 @@ def _report_success(self) -> None:
ExtractionPipelineRun(
extpipe_external_id=self.extraction_pipeline.external_id,
status="success",
message="Successful shutdown",
message=self.success_message,
)
)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cognite-extractor-utils"
version = "6.1.1"
version = "6.1.2"
description = "Utilities for easier development of extractors for CDF"
authors = ["Mathias Lohne <[email protected]>"]
license = "Apache-2.0"
Expand Down