call purge_orphans from daemon main loop function
This commit is contained in:
parent
602ed7f209
commit
0e0dd4861b
|
@ -311,6 +311,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
purge_orphans($link);
|
||||||
|
}
|
||||||
|
|
||||||
|
function purge_orphans($link) {
|
||||||
// purge orphaned posts in main content table
|
// purge orphaned posts in main content table
|
||||||
db_query($link, "DELETE FROM ttrss_entries WHERE
|
db_query($link, "DELETE FROM ttrss_entries WHERE
|
||||||
(SELECT COUNT(int_id) FROM ttrss_user_entries WHERE ref_id = id) = 0");
|
(SELECT COUNT(int_id) FROM ttrss_user_entries WHERE ref_id = id) = 0");
|
||||||
|
@ -5710,6 +5714,8 @@
|
||||||
// Send feed digests by email if needed.
|
// Send feed digests by email if needed.
|
||||||
if (DAEMON_SENDS_DIGESTS) send_headlines_digests($link);
|
if (DAEMON_SENDS_DIGESTS) send_headlines_digests($link);
|
||||||
|
|
||||||
|
purge_orphans($link);
|
||||||
|
|
||||||
} // function update_daemon_common
|
} // function update_daemon_common
|
||||||
|
|
||||||
function sanitize_article_content($text) {
|
function sanitize_article_content($text) {
|
||||||
|
|
|
@ -79,7 +79,6 @@
|
||||||
_debug("Finished, $count feeds processed.");
|
_debug("Finished, $count feeds processed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
db_close($link);
|
db_close($link);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -44,9 +44,6 @@
|
||||||
// Update all feeds needing a update.
|
// Update all feeds needing a update.
|
||||||
update_daemon_common($link);
|
update_daemon_common($link);
|
||||||
|
|
||||||
// Send feed digests by email if needed.
|
|
||||||
if (DAEMON_SENDS_DIGESTS) send_headlines_digests($link);
|
|
||||||
|
|
||||||
db_close($link);
|
db_close($link);
|
||||||
|
|
||||||
unlink(LOCK_DIRECTORY . "/$lock_filename");
|
unlink(LOCK_DIRECTORY . "/$lock_filename");
|
||||||
|
|
Loading…
Reference in New Issue