Compare commits
No commits in common. "36014518cc5afa2d9ae3c2f15601e3ba1525452a" and "05d10e443d14b194027467b9e2383f2b280ee9f8" have entirely different histories.
36014518cc
...
05d10e443d
2 changed files with 3 additions and 7 deletions
|
@ -22,9 +22,8 @@ printf "\rContactDiscovery\t%s\n\r" "${cbmax}"
|
|||
|
||||
cc=${limit}
|
||||
ccmax=0
|
||||
sudo mariadb friendica -B -N -q -e "create table tmp_url (select \`url\` from \`contact\` where \`id\` in (select \`contact-id\` from \`group_member\`) or \`id\` in (select \`cid\` from \`user-contact\`) or \`id\` in (select \`uid\` from \`user\`));"
|
||||
until [[ ${cc} -lt ${limit} ]]; do
|
||||
cc=$(sudo mariadb friendica -B -N -q -e "delete from workerqueue where \`command\`= \"AddContact\" and regexp_replace(substring_index(substring_index(\`parameter\`, '\\\"', -2), '\\\"', 1), '\\\\\\\\', '') not in (select \`url\` from tmp_url) and \`done\` = 0 limit ${cc}; select row_count();")
|
||||
cc=$(sudo mariadb friendica -B -N -q -e "create temporary table tmp_addcontact (select \`url\` from \`contact\` where \`id\` in (select \`contact-id\` from \`group_member\`) or \`id\` in (select \`cid\` from \`user-contact\`) or \`id\` in (select \`uid\` from \`user\`)); delete from workerqueue where \`command\`= \"AddContact\" and regexp_replace(substring_index(substring_index(\`parameter\`, '\\\"', -2), '\\\"', 1), '\\\\\\\\', '') not in (select \`url\` from tmp_addcontact) and \`done\` = 0 limit ${cc}; select row_count();")
|
||||
ccmax=$((ccmax + cc))
|
||||
printf "\rAddContact \t%s\r" "${ccmax}"
|
||||
done
|
||||
|
@ -33,9 +32,8 @@ printf "\rAddContact \t%s\n\r" "${ccmax}"
|
|||
|
||||
cd=${limit}
|
||||
cdmax=0
|
||||
#sudo mariadb friendica -B -N -q -e "create table tmp_updategserver (select \`url\` from \`contact\` where \`id\` in (select \`contact-id\` from \`group_member\`) or \`id\` in (select \`cid\` from \`user-contact\`) or \`id\` in (select \`uid\` from \`user\`));"
|
||||
until [[ ${cd} -lt ${limit} ]]; do
|
||||
cd=$(sudo mariadb friendica -B -N -q -e "delete from workerqueue where \`command\` = \"UpdateGServer\" and regexp_replace(substring_index(substring_index(\`parameter\`, '\\\"', -2), '\\\"', 1), '\\\\\\\\', '') not in (select \`url\` from tmp_url) and \`done\` = 0 limit ${cd}; select row_count();")
|
||||
cd=$(sudo mariadb friendica -B -N -q -e "create temporary table tmp_updategserver (select \`url\` from \`contact\` where \`id\` in (select \`contact-id\` from \`group_member\`) or \`id\` in (select \`cid\` from \`user-contact\`) or \`id\` in (select \`uid\` from \`user\`)); delete from workerqueue where \`command\` = \"UpdateGServer\" and regexp_replace(substring_index(substring_index(\`parameter\`, '\\\"', -2), '\\\"', 1), '\\\\\\\\', '') not in (select \`url\` from tmp_updategserver) and \`done\` = 0 limit ${cd}; select row_count();")
|
||||
cdmax=$((cdmax + cd))
|
||||
printf "\rUpdateGServer\t\t%s\r" "${cdmax}"
|
||||
done
|
||||
|
@ -45,11 +43,10 @@ printf "\rUpdateGServer\t\t%s\n\r" "${cdmax}"
|
|||
ce=${limit}
|
||||
cemax=0
|
||||
until [[ ${ce} -lt ${limit} ]]; do
|
||||
ce=$(sudo mariadb friendica -B -N -q -e "delete from workerqueue where \`command\`= \"FetchFeaturedPosts\" and regexp_replace(substring_index(substring_index(\`parameter\`, '\\\"', -2), '\\\"', 1), '\\\\\\\\', '') not in (select \`url\` from tmp_url) and \`done\` = 0 limit ${ce}; select row_count();")
|
||||
ce=$(sudo mariadb friendica -B -N -q -e "create temporary table tmp_fetchfeaturedposts (select \`url\` from \`contact\` where \`id\` in (select \`contact-id\` from \`group_member\`) or \`id\` in (select \`cid\` from \`user-contact\`) or \`id\` in (select \`uid\` from \`user\`)); delete from workerqueue where \`command\`= \"FetchFeaturedPosts\" and regexp_replace(substring_index(substring_index(\`parameter\`, '\\\"', -2), '\\\"', 1), '\\\\\\\\', '') not in (select \`url\` from tmp_fetchfeaturedposts) and \`done\` = 0 limit ${ce}; select row_count();")
|
||||
cemax=$((cemax + ce))
|
||||
printf "\rFetchFeaturedPosts\t%s\r" "${cemax}"
|
||||
done
|
||||
sudo mariadb friendica -B -N -q -e "drop table tmp_url"
|
||||
printf "\rFetchFeaturedPosts\t%s\n\r" "${cemax}"
|
||||
#echo "FetchFeaturedPosts $cemax"
|
||||
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
#!/bin/bash
|
||||
sudo mariadb friendica --execute="select distinct command, count(*) from workerqueue where done = 0 group by command; select count(*) from workerqueue where done = 0; select count(*) from workerqueue where command = \"ProcessQueue\" and pid = 0 and done = 0"
|
||||
sudo redis-cli -n 1 keys '*' | cut -d":" -f2 | cut -d "-" -f 1-3 | sort | uniq -c | sort -n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue