Expire qvitter notifications

This commit is contained in:
Bob Mottram 2017-04-23 23:18:23 +01:00
parent bc26972861
commit 4a0982acd0
1 changed files with 4 additions and 1 deletions

View File

@ -542,6 +542,7 @@ function expire_gnusocial_posts {
echo "\$notice_query=\"DELETE FROM notice WHERE created <= '\$oldate 01:01:01'\";" >> $gnusocial_expire_posts_script
echo "\$conversation_query=\"DELETE FROM conversation WHERE created <= '$oldate 01:01:01'\";" >> $gnusocial_expire_posts_script
echo "\$reply_query=\"DELETE FROM reply WHERE modified <= '\$oldate 01:01:01'\";" >> $gnusocial_expire_posts_script
echo "\$notification_query=\"DELETE FROM qvitternotification WHERE created <= '\$oldate 01:01:01'\";" >> $gnusocial_expire_posts_script
echo '' >> $gnusocial_expire_posts_script
echo 'mysql_query($notice_query);' >> $gnusocial_expire_posts_script
echo '$rowaff1=mysql_affected_rows();' >> $gnusocial_expire_posts_script
@ -549,10 +550,12 @@ function expire_gnusocial_posts {
echo '$rowaff2=mysql_affected_rows();' >> $gnusocial_expire_posts_script
echo 'mysql_query($reply_query);' >> $gnusocial_expire_posts_script
echo '$rowaff3=mysql_affected_rows();' >> $gnusocial_expire_posts_script
echo 'mysql_query($notification_query);' >> $gnusocial_expire_posts_script
echo '$rowaff4=mysql_affected_rows();' >> $gnusocial_expire_posts_script
echo 'mysql_close();' >> $gnusocial_expire_posts_script
echo '' >> $gnusocial_expire_posts_script
echo -n "echo \"Expire ${gnusocial_type} posts: " >> $gnusocial_expire_posts_script
echo '$rowaff1 notices, $rowaff2 conversations, and $rowaff3 replies deleted from database.\n";' >> $gnusocial_expire_posts_script
echo '$rowaff1 notices, $rowaff2 conversations, $rowaff3 replies, and $rowaff4 qvitter notifications deleted from database.\n";' >> $gnusocial_expire_posts_script
chmod +x $gnusocial_expire_posts_script
gnusocial_expire_script=/usr/bin/${gnusocial_type}-expire