openplans / openblock

OpenBlock is a web application and RESTful service that allows users to browse and search their local area for "hyper-local news
61 stars 26 forks source link

Feature for update_aggregates to start from scratch #214

Closed slinkp closed 12 years ago

slinkp commented 12 years ago

Discovered while working on #172: There is no convenient way to wipe out all the aggregates. This would be a very useful workaround for any more undiscovered bugs in the aggregates code. This should be a command-line option to the update_aggregates script.

It would do something like:

from ebpub.db import models
for name in dir(models):
    obj = getattr(models, name)
    if issubclass(obj, AggregateBaseClass) and obj is not AggregateBaseClass:
        print "Nuking all", name
        obj.objects.all.delete()
slinkp commented 12 years ago

(In [58ad4d3ca728d1b7301056dad81cc8314dda290f]) * Fix mismatch between time deltas used for calculating aggregates vs. displaying aggregates. Should fix the "Unknown" problem in charts, closes #192.

slinkp commented 12 years ago

Ticket imported from Trac: http://developer.openblockproject.org/ticket/221 Reported by: slinkp