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

fix return from cache #5

Merged
merged 1 commit into from
Aug 17, 2023
Merged
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
12 changes: 6 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ def get_commit_by_date(self, repository, date):
return find_commit

def get_repository_by_commit(self, repository, commit):
find_repo = self.repo_cache.retrieve_value(commit)
repo_data = self.repo_cache.retrieve_value(commit)

if not find_repo:
find_repo = self.client.get_repository_at_commit(repository, commit)
cleaned = self.data_filter.parse_data(find_repo)
self.repo_cache.add_to_cache(commit, cleaned)
if not repo_data:
repo_data = self.client.get_repository_at_commit(repository, commit)
repo_data = self.data_filter.parse_data(repo_data)
self.repo_cache.add_to_cache(commit, repo_data)

return cleaned
return repo_data


def main(args):
Expand Down