-
-
Save wohali/3d0070de6b4e7989f2303a54713ef8db 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
import requests | |
import subprocess | |
import tarfile | |
req = requests.get("https://couchdb-vm2.apache.org/ci_errorlogs/_all_docs") | |
alldocs = req.json() | |
for d in alldocs['rows']: | |
if '_design' not in d['id']: | |
foo = requests.get("https://couchdb-vm2.apache.org/ci_errorlogs/" + d['id'] + '/couchlog.tar.gz') | |
with open('/tmp/foo.tar.gz', 'w') as f: | |
f.write(foo.content) | |
tar = tarfile.open('/tmp/foo.tar.gz') | |
tar.extractall(path='/tmp/pyfoo') | |
tar.close() | |
status = subprocess.call("grep -qr \"{nocatch,{mp_parser_died,noproc}}\" /tmp/pyfoo", shell=True) | |
if status == 0: | |
print(d['id']) | |
_ = subprocess.call("rm -rf /tmp/pyfoo/*", shell=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment