Skip to content

Commit 2a3bbab

Browse files
committed
- bugfix scan_pypi_mirror.sh
- remove mirrorjson prefetching as it's already prefetched when individual packages are prefetched
1 parent fa55117 commit 2a3bbab

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

aura/prefetch.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ def prefetch_mirror(uris: Iterable[str], workers=10):
4444
logger.info("Caching list of packages on pypi")
4545
cache.PyPIPackageList.proxy()
4646

47-
logger.info("Prefetching package JSON information")
48-
lm = mirror.LocalMirror()
49-
pkgs = tuple(lm.list_packages())
50-
for x in tqdm.tqdm(pkgs, leave=False):
51-
lm.get_json(x)
47+
#logger.info("Prefetching package JSON information")
48+
#lm = mirror.LocalMirror()
49+
#pkgs = tuple(lm.list_packages())
50+
#for x in tqdm.tqdm(pkgs, leave=False):
51+
# lm.get_json(x)
5252

5353
loop = asyncio.get_event_loop()
5454

files/scan_pypi_mirror.sh

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if [ ! -d "${AURA_MIRROR_PATH}/json" ]; then
2424
fi
2525

2626
if [ ! -f "$OUTDIR/package_cache" ]; then
27-
if [ -f $AURA_MIRROR_PATH/pypi_package_list.txt]; then
27+
if [ -f $AURA_MIRROR_PATH/pypi_package_list.txt ]; then
2828
cp $AURA_MIRROR_PATH/pypi_package_list.txt $OUTDIR/package_cache;
2929
else
3030
ls $AURA_MIRROR_PATH/json >$OUTDIR/package_cache;
@@ -44,21 +44,10 @@ scan() {
4444
else
4545
echo $1 >>$OUTDIR/processed_packages.log
4646
fi
47-
48-
if [ -s $RESULTS_FILE ]; then
49-
echo "Removing empty $RESULTS_FILE"
50-
rm $RESULTS_FILE
51-
fi
52-
53-
if [ -s $ERROR_FILE ]; then
54-
echo "Removing empty $ERROR_FILE"
55-
rm $ERROR_FILE
56-
fi
57-
5847
}
5948

6049
export -f scan
6150

6251
echo "Starting Aura scan"
6352

64-
echo $PKGS|tr ' \r' '\n'| parallel --memfree 5G -j30 --progress --resume-failed --timeout 1200 --joblog $OUTDIR/joblog --max-args 1 scan
53+
echo $PKGS|tr ' \r' '\n'| parallel --memfree 5G --progress --resume-failed --timeout 1200 --joblog $OUTDIR/joblog --max-args 1 scan

0 commit comments

Comments
 (0)