Skip to content

Commit

Permalink
head 100
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Oct 29, 2024
1 parent 12d8e6c commit 6365bb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,18 @@ main() {
awk -F'|' '{print $2}' <packages_all
)" | sort -u | parallel "sed -i '\,^{}$,d' $BKG_OWNERS"

if [[ "$pkg_left" == "0" || "${db_size_curr::-2}" == "${db_size_prev::-2}" ]]; then
if [[ "$pkg_left" == "0" || "${db_size_curr::-3}" == "${db_size_prev::-3}" ]]; then
set_BKG BKG_BATCH_FIRST_STARTED "$today"
rm -f packages_to_update
\cp packages_all packages_to_update
fi

env_parallel --lb save_owner <"$BKG_OWNERS"
[ "$(wc -l <"$BKG_OWNERS")" -gt 100 ] || seq 1 2 | env_parallel --lb --halt soon,fail=1 page_owner
head -n100 "$BKG_OWNERS" | env_parallel --lb save_owner
awk -F'|' '{print $1"/"$2}' <packages_to_update | sort -uR 2>/dev/null | head -n1000 | env_parallel --lb save_owner
parallel "sed -i '\,^{}$,d' $BKG_OWNERS" <"$connections"
set_BKG BKG_DIFF "$db_size_curr"
rm -f "$connections"
[ "$(wc -l <"$BKG_OWNERS")" -gt 32 ] || seq 1 2 | env_parallel --lb --halt soon,fail=1 page_owner
else
save_owner "$GITHUB_OWNER"
fi
Expand Down
1 change: 1 addition & 0 deletions src/lib/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ save_version() {
version_dl_week=$(_jq "$1" '.downloads_week')
version_dl_day=$(_jq "$1" '.downloads_day')
version_tags=$(_jq "$1" '.tags')
[[ "$version_id" =~ ^[0-9]+$ ]] || version_id=\"$version_id\"
[[ "$version_size" =~ ^[0-9]+$ ]] || version_size=-1
[[ "$version_dl" =~ ^[0-9]+$ ]] || version_dl=-1
[[ "$version_dl_month" =~ ^[0-9]+$ ]] || version_dl_month=-1
Expand Down

0 comments on commit 6365bb5

Please sign in to comment.