bulkmail_record_queued_message

one of the documented procedures in this installation of the ACS
Usage:
bulkmail_record_queued_message   bulkmail_id
What it does:
Record a queued message in the instance message count
Defined 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



philg@mit.edu