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

feat: #105 #106

Closed
wants to merge 2 commits into from
Closed

feat: #105 #106

wants to merge 2 commits into from

Conversation

yihong0618
Copy link
Contributor

No description provided.

@Yikun
Copy link
Owner

Yikun commented Apr 19, 2021

Wow,非常感谢贡献!代码实现本身没什么问题。

但我突然想起之前加过意个lru_cache在_get_all_repo_names上,理论上讲,重复的调用都会被cache,在第二次调用的时候都会直接返回cache,但是不知道为什么这个装饰器不生效?

@functools.lru_cache
def _get_all_repo_names(self, url, page=1):

@yihong0618
Copy link
Contributor Author

Wow,非常感谢贡献!代码实现本身没什么问题。

但我突然想起之前加过意个lru_cache在_get_all_repo_names上,理论上讲,重复的调用都会被cache,在第二次调用的时候都会直接返回cache,但是不知道为什么这个装饰器不生效?

@functools.lru_cache
def _get_all_repo_names(self, url, page=1):

我理解是生效了的~

@Yikun
Copy link
Owner

Yikun commented Apr 19, 2021

我理解是生效了的~

那我理解我 #100 (comment) 之前的判断是有误的,这块其实不涉及多次操作,去查询目的端是否存在,不会在一次同步中重复调用,对吧?

所以,这个patch是否也不需要了呢?

另外,我又仔细看了下你的错误,有一些错误是gitee api不稳定引起的,还有一部分是因为rate limit,所以,周期任务时间调短一些是正确的。

@yihong0618
Copy link
Contributor Author

嗯,是不需要了哈哈。
同意,我明天具体跑一下。

@yihong0618
Copy link
Contributor Author

@Yikun
感觉我可以关了这个 pr 了。应该是生效了的。

@yihong0618 yihong0618 closed this Apr 20, 2021
@Yikun
Copy link
Owner

Yikun commented Apr 21, 2021

@yihong0618 感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants