Hi, Thanks for replying, I have thought about subclassing but how to do it dynamically. The only one way I can think of is dynamically generate python string contains the class definitions and then eval it to return the class object.
Where is my python doc for eval-ing string :-) Any other way better than this? Cheers, On Wed, Apr 13, 2011 at 6:48 AM, Gustavo Niemeyer <[email protected]> wrote: >> I have tried to use setattr(AccessLog, '__storm_table__', >> 'table-name') which get rid of the error. However I can only set it >> once. Reset it to another value will not work, it still pointing to >> the old one. > > Yes, as you have figured the attribute is cached for performance, so > that kind of trick won't work indeed. > > What you can do, though, is have multiple subclasses and define custom > tables for them. > > -- > Gustavo Niemeyer > http://niemeyer.net > http://niemeyer.net/blog > http://niemeyer.net/twitter > -- Steve Kieu -- storm mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm
