Mercurial > hg > Feedworm
annotate feedupdate.py @ 134:40163eac0d27
rename feedupdate-main to feedupdate, adjust the launch script
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Tue, 23 Aug 2011 03:49:29 +0200 |
parents | feedupdate-main.py@32a173cb081c |
children | 5b131f82057d |
rev | line source |
---|---|
2
8a624ee48a74
First skeleton for sqlalchemy: define the mapping and create the first feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
8a624ee48a74
First skeleton for sqlalchemy: define the mapping and create the first feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
2 |
11
e87c54b3a216
use the logging framework for printing messages
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
6
diff
changeset
|
3 import logging |
134
40163eac0d27
rename feedupdate-main to feedupdate, adjust the launch script
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
128
diff
changeset
|
4 #from backend.sqlalchemy.SqlAlchemyBackend import SqlAlchemyBackend |
40163eac0d27
rename feedupdate-main to feedupdate, adjust the launch script
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
128
diff
changeset
|
5 from backend.couchdb.CouchDbBackend import CouchDbBackend |
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
|
6 |
2
8a624ee48a74
First skeleton for sqlalchemy: define the mapping and create the first feed
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
7 if __name__ == "__main__": |
128
32a173cb081c
move updating the feeds to the backend
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
110
diff
changeset
|
8 logging.basicConfig(level=logging.DEBUG) |
134
40163eac0d27
rename feedupdate-main to feedupdate, adjust the launch script
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
128
diff
changeset
|
9 # backend = SqlAlchemyBackend() |
40163eac0d27
rename feedupdate-main to feedupdate, adjust the launch script
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
128
diff
changeset
|
10 backend = CouchDbBackend() |
128
32a173cb081c
move updating the feeds to the backend
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
110
diff
changeset
|
11 backend.updateAllFeeds() |
32a173cb081c
move updating the feeds to the backend
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
110
diff
changeset
|
12 backend.expireFeedEntries() |
32a173cb081c
move updating the feeds to the backend
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
110
diff
changeset
|
13 backend.dispose() |