Forum OpenACS Development: Some proposals.

Collapse
12: Some proposals. (response to 1)
Posted by Denis Khitrov on
Hi! I came little bit deeper in scheduling related codes and found some simple ideas that may improve it. I think there are two ways to optimize scripts related to scheduling:

1. Do not use wrapper, but just user native AOL Server features. As I see from the code the only use of wrappers is to keep consitancy of monitoring information. For monitoring needs ns_info scheduled should be enough .

Hence, wrappers is good from porting point of view.

2. In current version ad_schedule_proc save proc_info to the shared variables and pass the same info to the ad_run_schedule_proc. This way do not alllows to have proc_id returned by ns_schedule_proc in both proc_infos, passed to the ad_run_schedule_proc, and in shared vars. proc_id may be stored only in shared vars, couse this value is unknown at the moment of ns_schedule_proc execution.

I propose to pass only index of the proc_info in shared var to the ad_run_schedule_proc instead of all proc_info.
This way will also simplify ad_run_schedule_proc code.

Collapse
Posted by Denis Khitrov on

There was no response to my proposals for rewriting scheduling stuff, so I've decided just extend the code from 4.6.1. I've just updloaded a patch with new function and some updates of old functions.

I still don't not like how this stuff is implemented, and hope to get any other opinions.

I also modified Monitoring package - added unscheduling option. Doing that I get another idea - what if add options like PAUSE, START, STOP. In this case all scheduled procedures will be always in the list, but not all will be runnig. It may be considered as "SERVICES".