bulkmail_reset_hosts_if_needed

one of the documented procedures in this installation of the ACS
Usage:
bulkmail_reset_hosts_if_needed
What it does:
Hack to reset bulkmail hosts if list is empty
Defined in: /web/philip/tcl/bulkmail-utils.tcl

Source code:


   ns_share bulkmail_failed_hosts_mutex
   ns_share bulkmail_failed_hosts
   ns_share bulkmail_hosts_mutex
   ns_share bulkmail_hosts
   ns_share bulkmail_current_host

    if {[llength $bulkmail_hosts] == 0} {
	ns_log Error "bulkmail_reset_hosts_if_needed: bulkmail_hosts is an empty list!  Resetting host and failed_hosts list and sleeping 10 mins"
	
	catch { 
	    ns_mutex lock $bulkmail_hosts_mutex
	    set bulkmail_hosts [bulkmail_get_hostlist]
	}
	ns_mutex unlock $bulkmail_hosts_mutex

	catch { 
	    ns_mutex lock $bulkmail_failed_hosts_mutex
	    set bulkmail_failed_hosts [ns_set create -persist bulkmail_failed_hosts]
	}
	ns_mutex unlock $bulkmail_failed_hosts_mutex	    

	set bulkmail_current_host 0
	ns_sleep 600
    }


philg@mit.edu