mekarpeles / waltz

Waltz lets you design web.py apps in 3/4 time
Other
12 stars 0 forks source link

web.ctx error (waltz lazydb analytics key) #9

Open mekarpeles opened 11 years ago

mekarpeles commented 11 years ago

In the event of an unclean shutdown / termination of the server, sometimes the analytics key within the waltz lazydb is left in a bad state. The solution is to rollback / remove the last analytics entry added to db (or optionally just db.put('analytics', []) if you don't care about the data.

mekarpeles commented 11 years ago

Actual error is with analytics decorator (when its recording data, has a file handler open and then crashes mid write). The error thrown is cPickle.PicklingError -- should be handled more gracefully in lazydb. Logging + error handling in @track decorator should also be updated

mekarpeles commented 11 years ago

Adding logging via waltz.log() to the track decorator in waltz.decorators to learn more.