mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 19:02:41 +00:00
improve packing script
This commit is contained in:
parent
199d2aaa92
commit
64545d6540
1 changed files with 16 additions and 2 deletions
|
@ -1,7 +1,21 @@
|
|||
while docs=$(curl "localhost:3015/doc/list?limit=1000"); do
|
||||
#!/bin/bash
|
||||
|
||||
# find all the docHistories with unpacked ops and pack them
|
||||
|
||||
HOST=${1:-"localhost:3015"}
|
||||
T=${2:-10}
|
||||
|
||||
echo packing all docHistory on $HOST with delay of $T
|
||||
for n in $(seq 5 -1 1) ; do
|
||||
echo starting in $n seconds
|
||||
sleep 1
|
||||
done
|
||||
|
||||
while docs=$(curl "$HOST/doc/list?limit=1000"); do
|
||||
if [ -z "$docs" ] ; then break ; fi
|
||||
for d in $docs ; do
|
||||
echo "packing $d"
|
||||
curl -X POST "localhost:3015/doc/$d/pack"
|
||||
curl -X POST "$HOST/doc/$d/pack"
|
||||
sleep $T
|
||||
done
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue