Last active
June 29, 2022 16:13
-
-
Save khuyentran1401/aa85c331c8ee1650bbf5db401c3da703 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, # new code | |
cache_expiration=timedelta(days=1), # new code | |
) | |
def get_general_info_of_repos(auth: dict): | |
... | |
@task( | |
cache_key_fn=task_input_hash, # new code | |
cache_expiration=timedelta(days=1), # new code | |
) | |
def get_starred_repo_urls(data: list): | |
... | |
@task( | |
cache_key_fn=task_input_hash, # new code | |
cache_expiration=timedelta(days=1), # 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