Mercurial > hg > Feedworm
annotate feedupdate.py @ 236:c5250fcc3881
remove a workaround along with its wrong explanation
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Mon, 26 Jan 2015 13:43:38 +0100 |
parents | f07cf25224a4 |
children |
rev | line source |
---|---|
223
f07cf25224a4
do not use python3 - the couchdb lib is not ready for it
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
221
diff
changeset
|
1 #!/usr/bin/env python |
217
bb3c851b18b1
add source file endcoding header
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
137
diff
changeset
|
2 # -*- coding: utf-8 -*- |
137
5b131f82057d
allow choosing the backend via commandline option
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
134
diff
changeset
|
3 import BackendFactory |
11
e87c54b3a216
use the logging framework for printing messages
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
6
diff
changeset
|
4 import logging |
68
525a52169f60
Make FeedEntry table object available in Mapping to use it to expire old, read feed entries.
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
64
diff
changeset
|
5 |
2
8a624ee48a74
First skeleton for sqlalchemy: define the mapping and create the first feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
6 if __name__ == "__main__": |
219
38d1898e7d82
include the time when logging
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
217
diff
changeset
|
7 logFormat = '%(asctime)s ' + logging.BASIC_FORMAT |
38d1898e7d82
include the time when logging
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
217
diff
changeset
|
8 logging.basicConfig(format=logFormat, level=logging.DEBUG) |
137
5b131f82057d
allow choosing the backend via commandline option
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
134
diff
changeset
|
9 backend = BackendFactory.createBackend() |
128
32a173cb081c
move updating the feeds to the backend
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
110
diff
changeset
|
10 backend.updateAllFeeds() |
32a173cb081c
move updating the feeds to the backend
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
110
diff
changeset
|
11 backend.expireFeedEntries() |
32a173cb081c
move updating the feeds to the backend
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
110
diff
changeset
|
12 backend.dispose() |