update-feeds.py
author Nicolas Chauvat <nicolas.chauvat@logilab.fr>
Thu, 05 Aug 2010 19:31:27 +0200
changeset 218 45510a9bb345
parent 215 4c9a9b321087
permissions -rw-r--r--
[views] use has_creator when available. add cwuri facet.

# -*- coding: utf-8 -*-
import sys

feeds = rql('Any A WHERE A is DataFeed').entities()
for feed in feeds:
    if 'reset' in sys.argv:
        feed.set_attributes(latest_retrieval=None)
    else:
        print '----- processing %r with %s' % (feed.title, feed.parser)
        feed.pull_data()
        print
commit()