Forum OpenACS Development: Re: ad_conn and no connection

Collapse
Posted by Christian Brechbuehler on
You bet my code is calling it in the wrong place 😊
I just don't know where it goes wrong.

The scheduled search::indexer calls bug_tracker::search::bug::datasource, and that calls ad_conn, which causes an error. (See my comment on ad_conn breaks all scheduled procs. Happy to post the whole call chain, if it helps.)

Quite likely I'm going about this the wrong way. I'm using code from OpenACS and am trying to make it work. Maybe I should enter a bug against package acs-subsite, because its procs use ad_conn? My patch simply assumes the main site (aka root) when there's no connecton -- not sure if that's correct.

It would help if every proc documented clearly whether it requires a connection, or if it's also ok to call it from a scheduled proc. We could postulate that a conn-only proc can call either, but a general proc can only call other general procs. That would make it clearer where things go wrong.