Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P1121
bakfill script for sha1 based ranges
Active
Public
Actions
Authored by
vsellier
on Aug 17 2021, 12:33 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
#!/bin/zsh
# From
setopt shwordsplit
objtype
=
extid
PARTITIONS
=
32
PARAMS
=
"--dry-run"
mkdir -p logs/
$objtype
for
i in
`
seq
0
$PARTITIONS
`
;
do
CMD
=
$(
python3 backfill_command.py
$PARTITIONS
$i
)
if
[
-z
"
$CMD
"
]
;
then
continue
fi
CMD
=
"
${
CMD
}
${
PARAMS
}
"
echo
"Starting
${
objtype
}
$CMD
"
echo
"
$CMD
"
SWH_CONFIG_FILENAME
=
/etc/softwareheritage/journal/backfill.yml stdbuf -o0
$CMD
2
>
&
1
|
stdbuf -o0 tee >
(
gzip -c > logs/
$objtype
/
$i
.log.gz
)
&
done
wait
Event Timeline
vsellier
created this paste.
Aug 17 2021, 12:33 PM
2021-08-17 12:33:11 (UTC+2)
Comment Actions
to use with
P1122
vsellier
edited the content of this paste.
(Show Details)
Aug 17 2021, 12:48 PM
2021-08-17 12:48:04 (UTC+2)
vsellier
edited the content of this paste.
(Show Details)
Aug 17 2021, 1:17 PM
2021-08-17 13:17:22 (UTC+2)
vsellier
mentioned this in
T3485: extid topic is misconfigured in staging and production
.
Aug 17 2021, 1:33 PM
2021-08-17 13:33:10 (UTC+2)
Log In to Comment