bulkmail_record_queued_message bulkmail_idWhat it does:
Record a queued message in the instance message countDefined in: /web/philip/tcl/bulkmail-utils.tcl
Source code:
ns_share bulkmail_instance_mutexes ns_share bulkmail_instances_mutex ns_share bulkmail_instances set instance_mutex [ns_set get $bulkmail_instance_mutexes $bulkmail_id] ns_mutex lock $instance_mutex catch { ns_mutex lock $bulkmail_instances_mutex catch { set instance_stats [ns_set get $bulkmail_instances $bulkmail_id] } ns_mutex unlock $bulkmail_instances_mutex # instance_stats is a two-item list: queued sent set queued_count [lindex $instance_stats 0] set sent_count [lindex $instance_stats 1] incr queued_count ns_mutex lock $bulkmail_instances_mutex catch { ns_set delkey $bulkmail_instances $bulkmail_id ns_set put $bulkmail_instances $bulkmail_id [list $queued_count $sent_count] } ns_mutex unlock $bulkmail_instances_mutex } ns_mutex unlock $instance_mutex