notification::reply::sweep::process_all_replies (private)

 notification::reply::sweep::process_all_replies

Defined in packages/notifications/tcl/reply-sweep-procs.tcl

Go through the replies in the DB and dispatch correctly to the right processor.

Partial Call Graph (max 5 caller/called nodes):
%3 db_dml db_dml (public) db_list_of_lists db_list_of_lists (public) notification::reply::delete notification::reply::delete (public) notification::type::process_reply notification::type::process_reply (public) notification::reply::sweep::process_all_replies notification::reply::sweep::process_all_replies notification::reply::sweep::process_all_replies->db_dml notification::reply::sweep::process_all_replies->db_list_of_lists notification::reply::sweep::process_all_replies->notification::reply::delete notification::reply::sweep::process_all_replies->notification::type::process_reply

Testcases:
No testcase defined.
Source code:
    ns_log Debug "notification::reply::sweep::process_all_replies starting"

    # Load up the replies
    set replies [db_list_of_lists select_replies {}]

    # Loop through and transactionally process each one
    foreach reply $replies {
        lassign $reply reply_id 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
            db_dml deletehold {}
            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"
        }
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
<fullquery name="notification::reply::sweep::process_all_replies.select_replies">
    <querytext>
select reply_id, type_id from notification_replies order by reply_date
</querytext>
</fullquery>

<fullquery name="notification::reply::sweep::process_all_replies.deletehold">
    <querytext>
    delete from notification_email_hold
    where reply_id = :reply_id
  </querytext>
</fullquery>
packages/notifications/tcl/reply-sweep-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: