mirror icon indicating copy to clipboard operation
mirror copied to clipboard

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

Open chestnutprog opened this issue 6 years ago • 7 comments
trafficstars

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

chestnutprog avatar May 11 '19 01:05 chestnutprog

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

AlynxZhou avatar May 12 '19 04:05 AlynxZhou

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

ideal avatar May 14 '19 11:05 ideal

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

AlynxZhou avatar May 14 '19 13:05 AlynxZhou

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

ideal avatar May 15 '19 02:05 ideal

 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: ''

之前同步根本没跑起来

chestnutprog avatar May 18 '19 12:05 chestnutprog

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

AlynxZhou avatar May 18 '19 14:05 AlynxZhou

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

ideal avatar May 20 '19 08:05 ideal