On Wed, Jun 9, 2010 at 3:34 AM, Thadeus Burgess <[email protected]> wrote:
> We have not fully agreed on the spec of PluginManager, it has been
> added as a proof of concept, however no plugins to date have been
> implemented with it. There are hundreds of posts debated what it
> should do.
>
> Currently the spec for plugins is you can do anything you want as long
> as it has the word plugin_ in front of it.
>
> PluginManager is an attempt to clean up the global namespace, so you
> don't have tons of plugins littering with their own variables and
> such.
>
> Not sure if you have seen this...
> http://static.thadeusb.com/Web2py%20Plugin%20Specification.pdf
My confusion was thinking that something in the released branch was
ready for use and not a proof of concept.  I notice what's there
disagrees with the specification above (which I hadn't seen before) in
that PluginManager in the released tools.py takes 1 arg, called 'env'
and not a DAL and not a default value for that DAL either.

One concept that I do need and will be prototyping is that of a
persistent DAL connection.  A plugin DAL should not exist just for the
life of a request, and obviously then would have to manage it's own
transactions.  But the plugin I'm writing kind of needs it.  It
instantiates a singleton class that starts it's own thread to manage a
scheduler, currently obviously at the end of the initial request that
started the singleton the passed database connection is no longer
valid.  I could pass the DAL knowledge to the singleton but that seems
'wrong'  And actually this is getting far afield of the original
topic...

On Wed, Jun 9, 2010 at 3:04 AM, AsmanCom <[email protected]> wrote:
> Hi,
>
> a Task Scheduler Plugin would be very nice.
> Kindly keep me posted about your progress!
>
> What exactly is the Problem, do you have a traceback?

>> plugins = PluginManager()
>> db = plugins.plugin_scheduler.db or None

My only problem was the comments in the source trunk didn't match the
actual implementation 2 lines later :)  I've moved on past it but was
a bit confused.

Reply via email to