Forum OpenACS Development: Re: ad_schedule_proc X dynamic values

Posted by Gustaf Neumann on

i do not think that the scheduled procs use locally cached values. I just did the following experiment using the global parameter "CacheSize" of xowiki for testing purposes.

First, in ds/shell, create a repeating scheduled procedure, which runs every 10 seconds:

set id [[ns_schedule_proc 10 { 
   set cache_size [parameter::get_global_value -package_key xowiki -parameter CacheSize -default 0]
   ns_log notice "xowiki CacheSize: $cache_size" 

Once the scheduled procedure is running, one sees an entry in the error.log every 10 seconds with the actual value of the global parameter.

When we change the parameter, e.g. via another ds/shell command like

parameter::set_global_value -package_key xowiki -parameter CacheSize -value 50000
then the next log entries are changed accordingly.

When i go to /acs-admin/ to change the global parameter, i see there the value of 50000 for "CacheSize", altering this value to e.g. "50001" has as well the expected result.