Skip to content

Instantly share code, notes, and snippets.

@khuyentran1401
Last active June 29, 2022 16:46
Show Gist options
  • Save khuyentran1401/abb63efc2ba539a73cb58a30d95a5b34 to your computer and use it in GitHub Desktop.
Save khuyentran1401/abb63efc2ba539a73cb58a30d95a5b34 to your computer and use it in GitHub Desktop.
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