ad_return_if_another_copy_is_running
one of
the defined (but not documented) Tcl procedures in this
installation of the ACS
Usage:
ad_return_if_another_copy_is_running { max_simultaneous_copies "1" } { call_adp_break_p "0" }
Source code:
set this_connection_url [ns_conn url]
set n_matches 0
foreach connection [ns_server active] {
set query_connection_url [lindex $connection 4]
if { $query_connection_url == $this_connection_url } {
incr n_matches
}
}
if { $n_matches > $max_simultaneous_copies } {
ad_return_warning "Too many copies" "This is an expensive page for
our server, which is already running the same program
on behalf of some other users. Please try again at a less busy hour."
if $call_adp_break_p {
ns_adp_break
}
return -code return
}
return 1