Skip to content

Commit

Permalink
🚧 Added trigger and cleaned up docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafalz13 committed Oct 11, 2023
1 parent cd2e0fc commit f364716
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions viadot/flows/transform_and_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from viadot.tasks import CloneRepo, AzureKeyVaultSecret, LumaIngest


@task()
@task(trigger=any_successful)
def _cleanup_repo(dbt_repo_dir_name: str) -> None:
"""
Remove a repo folder.
Expand All @@ -23,7 +23,7 @@ def _cleanup_repo(dbt_repo_dir_name: str) -> None:

@task(trigger=any_successful)
def custom_shell_task(name: str, command: str, helper_script: str = None) -> None:
"""_
"""
Task created to run ShellTask and apply `trigger` on it. For regular ShellTask it is not possible.
Args:
Expand Down
7 changes: 2 additions & 5 deletions viadot/tasks/luma.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json

from prefect.tasks.shell import ShellTask

from prefect.triggers import any_successful
from .azure_key_vault import AzureKeyVaultSecret


Expand Down Expand Up @@ -41,9 +40,7 @@ def __init__(
self.helper_script = dbt_project_path
self.url = url
self.metadata_dir_path = metadata_dir_path
self.command = (
f"luma dbt send-test-results --luma-url {url} --metadata-dir {metadata_dir_path}"
)
self.command = f"luma dbt send-test-results --luma-url {url} --metadata-dir {metadata_dir_path}"
self.return_all = True
self.stream_output = True
self.log_stderr = True

0 comments on commit f364716

Please sign in to comment.