Index: openacs-4/packages/notifications/tcl/sweep-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/notifications/tcl/sweep-procs.tcl 30 Nov 2002 17:40:18 -0000 1.11 +++ openacs-4/packages/notifications/tcl/sweep-procs.tcl 16 Jan 2003 13:53:10 -0000 1.12 @@ -17,9 +17,10 @@ } ad_proc -public cleanup_notifications {} { - Clean up the notifications that have been sent out. + Clean up the notifications that have been sent out (DRB: inefficiently...). } { # Get the list of the ones to kill + set notification_id_list [db_list select_notification_ids {}] # Kill them @@ -52,14 +53,14 @@ # Batched sending foreach notif $notifications { - ns_log Notice "NOTIF-BATCHED: one notif $notif" + ns_log Debug "NOTIF-BATCHED: one notif $notif" if {$notif != "STOP"} { - ns_log Notice "NOTIF-BATCHED: NOT a stop codon" + ns_log Debug "NOTIF-BATCHED: NOT a stop codon" set user_id [ns_set get $notif user_id] set type_id [ns_set get $notif type_id] } else { - ns_log Notice "NOTIF-BATCHED stop codon!" + ns_log Debug "NOTIF-BATCHED stop codon!" set user_id "" set type_id "" } @@ -68,11 +69,11 @@ # if so, batch up previous stuff and send it if {$notif == "STOP" || $user_id != $prev_user_id || $type_id != $prev_type_id} { - ns_log Notice "NOTIF-BATCHED: batching things up for $prev_user_id" + ns_log Debug "NOTIF-BATCHED: batching things up for $prev_user_id" # If no content, keep going if {![empty_string_p $batched_content]} { - ns_log Notice "NOTIF-BATCHED: content to send!" + ns_log Debug "NOTIF-BATCHED: content to send!" db_transaction { ns_log Notice "NOTIF-BATCHED: sending content" # System name is used in the subject @@ -83,7 +84,7 @@ -content $batched_content \ -delivery_method_id $prev_deliv_method_id - ns_log Notice "NOTIF-BATCHED: marking notifications" + ns_log Debug "NOTIF-BATCHED: marking notifications" foreach not_id $list_of_notification_ids { # Mark it as sent notification::mark_sent \ @@ -96,7 +97,7 @@ set list_of_notification_ids [list] set batched_content "" } else { - ns_log Notice "NOTIF-BATCHED: NO content to send!" + ns_log Debug "NOTIF-BATCHED: NO content to send!" } }