> I think what you're looking for is trac.env.IEnvironmentSetupParticipant:
>
> http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.env.IEnvironmentSetupParticipant
>
> Here's an example of using it, both to detect whether an upgrade is needed,
> and to perform that upgrade:
>
> https://github.com/boldprogressives/trac-MultiRepoSearchPlugin/blob/master/multireposearch/sqlindexer.py#L92
>
> (My code uses an database abstraction API that's provided by another plugin,
> which is what those execute_non_query, get_scalar, etc function calls are.)
>
> Hope this helps,

Yes, that helps a lot.  Thanks.  If I understand correctly, every
instance of environment_needs_upgrade() is called on every startup and
can determine the need for an upgrade in a plugin-specific fashion.
So, my scheduler could query the db to see if there is an existing
schedule and if not, say an upgrade is needed.  Then the
upgrade_environment() would do the slow initial scheduling.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to