Last active
June 29, 2022 16:46
-
-
Save khuyentran1401/abb63efc2ba539a73cb58a30d95a5b34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from prefect import task, flow | |
from prefect.tasks import task_input_hash | |
... | |
@task( | |
cache_key_fn=task_input_hash, | |
cache_expiration=timedelta(days=1), | |
retries=3, # new code | |
retry_delay_seconds=60, # new code | |
) | |
def get_general_info_of_repos(auth: dict): | |
... | |
@task( | |
cache_key_fn=task_input_hash, | |
cache_expiration=timedelta(days=1), | |
) | |
def get_starred_repo_urls(data: list): | |
... | |
@task( | |
cache_key_fn=task_input_hash, | |
cache_expiration=timedelta(days=1), | |
retries=3, # new code | |
retry_delay_seconds=60, # new code | |
) | |
def get_specific_info_of_repos(auth: dict, repo_urls: list): | |
... | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment