agrynchuk / noodle-ng

Automatically exported from code.google.com/p/noodle-ng
GNU General Public License v3.0
0 stars 0 forks source link

Save statistics about crawler runs #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We could use the Statistic base class in our model to save a history of results 
from crawler runs.

I suggest something like:
class Crawl(Statistic):
    crawl_time = Column(Float)
    new = Column(Integer)
    changed = Column(Integer)
    deleted = Column(Integer)
    sharesize = Column(BigInteger)
    __mapper_args__ = {'polymorphic_identity': u'crawl'}

    def __init__(self, crawl_time, date=datetime.now()):
        self.crawl_time = crawl_time
        self.date = date

I will implement the change in branches/tg2.1 and see how it works out!

Original issue reported on code.google.com by moschlar@metalabs.de on 20 Sep 2011 at 2:20