Index: openacs-4/packages/notifications/tcl/reply-sweep-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/reply-sweep-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/notifications/tcl/reply-sweep-procs.tcl 3 Oct 2003 11:12:27 -0000 1.5 +++ openacs-4/packages/notifications/tcl/reply-sweep-procs.tcl 1 Nov 2003 08:45:39 -0000 1.6 @@ -10,45 +10,44 @@ } -namespace eval notification::reply::sweep { - - ad_proc -public scan_all_replies {} { - Go through all the delivery methods and scan replies for that delivery method. - } { - ns_log Notice "NOTIF- scan_all_replies starting" +namespace eval notification::reply::sweep {} - # Load up the delivery methods - set delivery_method_ids [db_list select_deliv_methods {}] - # Loop and scan replies on each one - foreach delivery_method_id $delivery_method_ids { - ns_log Notice "NOTIF- scan_all_replies deliv method $delivery_method_id" - notification::delivery::scan_replies -delivery_method_id $delivery_method_id - } +ad_proc -public notification::reply::sweep::scan_all_replies {} { + Go through all the delivery methods and scan replies for that delivery method. +} { + ns_log Debug "notification::reply::sweep::scan_all_replies starting" + + # Load up the delivery methods + set delivery_method_ids [db_list select_deliv_methods {}] + + # Loop and scan replies on each one + foreach delivery_method_id $delivery_method_ids { + ns_log Debug "scan_all_replies deliv method $delivery_method_id" + notification::delivery::scan_replies -delivery_method_id $delivery_method_id } +} - ad_proc -public process_all_replies {} { - Go through the replies in the DB and dispatch correctly to the right processor. - } { - ns_log Notice "NOTIF- process_all_replies starting" +ad_proc -public notification::reply::sweep::process_all_replies {} { + Go through the replies in the DB and dispatch correctly to the right processor. +} { + ns_log Debug "notification::reply::sweep::process_all_replies starting" - # Load up the replies - set replies [db_list_of_lists select_replies {}] + # Load up the replies + set replies [db_list_of_lists select_replies {}] - # Loop through and transactionally process each one - foreach reply $replies { - set reply_id [lindex $reply 0] - set type_id [lindex $reply 1] + # Loop through and transactionally process each one + foreach reply $replies { + set reply_id [lindex $reply 0] + set type_id [lindex $reply 1] - ns_log Notice "NOTIF- one reply $reply_id of type $type_id" + ns_log Debug "process_all_replies: one reply $reply_id of type $type_id" - if { [ catch { - notification::type::process_reply -type_id $type_id -reply_id $reply_id - notification::reply::delete -reply_id $reply_id - } err ] } { - ns_log Error "NOTIF- notification::reply::sweep bombed on reply_id $reply_id - $err" - } + if { [ catch { + notification::type::process_reply -type_id $type_id -reply_id $reply_id + notification::reply::delete -reply_id $reply_id + } err ] } { + ns_log Error "notification::reply::sweep::process_all_replies: bombed on reply_id $reply_id:\n$err" } } - }