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

建议simple task返回值非0时记录failed #11

Open
chestnutprog opened this issue May 11, 2019 · 7 comments
Open

建议simple task返回值非0时记录failed #11

chestnutprog opened this issue May 11, 2019 · 7 comments

Comments

@chestnutprog
Copy link
Contributor

RT,刚才发现pypi已经挂了很久但是因为不检查返回值所以一直显示success.

@AlynxZhou
Copy link

@chestnutprog 是 pypi 自己的问题,它同步用的不是 rsync,成功时候不返回 0,对于这种不按套路出牌的要解决很麻烦。

@ideal
Copy link
Owner

ideal commented May 14, 2019

@AlynxZhou https://github.com/pypa/bandersnatch 是这个吗?出错时返回了0?

@AlynxZhou
Copy link

我记得是这样的。然后我在网页端写了个判断规避,但似乎翻车了?
Screenshot from 2019-05-14 21-13-37

@ideal
Copy link
Owner

ideal commented May 15, 2019

@chestnutprog 方便看下pypi的同步日志吗?

@chestnutprog
Copy link
Contributor Author

 31 2019-05-08 16:55:00,668 INFO: bandersnatch/1.11 (CPython 2.7.12-final0, Linux 4.4.0-81-generic x    86_64)
 32 Traceback (most recent call last):
 33   File "/usr/local/bin/bandersnatch", line 11, in <module>
 34     load_entry_point('bandersnatch==1.11', 'console_scripts', 'bandersnatch')()
 35   File "/usr/local/lib/python2.7/dist-packages/bandersnatch/main.py", line 69, in main
 36     args.func(config)
 37   File "/usr/local/lib/python2.7/dist-packages/bandersnatch/main.py", line 27, in mirror
 38     hash_index=config.getboolean('mirror', 'hash-index'))
 39   File "/usr/local/lib/python2.7/dist-packages/bandersnatch/mirror.py", line 65, in __init__
 40     self._bootstrap()
 41   File "/usr/local/lib/python2.7/dist-packages/bandersnatch/mirror.py", line 251, in _bootstrap
 42     self._load()
 43   File "/usr/local/lib/python2.7/dist-packages/bandersnatch/mirror.py", line 271, in _load
 44     generation = int(open(self.generationfile, 'r').read().strip())
 45 ValueError: invalid literal for int() with base 10: ''

之前同步根本没跑起来

@AlynxZhou
Copy link

这玩意根本不走 rsync 来着……

@ideal
Copy link
Owner

ideal commented May 20, 2019

@AlynxZhou 嗯这个是bandersnatch不是rsync,有点疑惑的是,按照 @chestnutprog 的日志,这个时候的exit code也是0?

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

No branches or pull requests

3 participants