Index: openacs-4/packages/news-aggregator/tcl/source-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator/tcl/source-procs.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/news-aggregator/tcl/source-procs.tcl 20 Jan 2020 17:10:46 -0000 1.22 +++ openacs-4/packages/news-aggregator/tcl/source-procs.tcl 5 Oct 2021 10:36:15 -0000 1.23 @@ -277,21 +277,20 @@ if { $source_count >= 1 } { if { !$all_sources_p } { set limit [expr {max(1, int($source_count/4))}] - set limit_sql [db_map sources_limit] } else { - set limit_sql "" + set limit "" } - foreach source [db_list_of_lists sources [subst { + foreach source [db_list_of_lists sources { select source_id, feed_url, last_modified from na_sources where :all_sources_p or last_scanned < (current_timestamp - interval '48 minutes') order by last_scanned asc - $limit_sql - }]] { + fetch first :limit rows only + }] { lassign $source source_id feed_url last_modified news_aggregator::source::update \ -source_id $source_id \