aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/controllers/feed.py4
-rw-r--r--pyaggr3g470r/models/feed.py4
-rw-r--r--pyaggr3g470r/views/api/feed.py10
3 files changed, 9 insertions, 9 deletions
diff --git a/pyaggr3g470r/controllers/feed.py b/pyaggr3g470r/controllers/feed.py
index a2455e2b..3d55f255 100644
--- a/pyaggr3g470r/controllers/feed.py
+++ b/pyaggr3g470r/controllers/feed.py
@@ -16,9 +16,9 @@ class FeedController(AbstractController):
max_last = now - timedelta(minutes=user.refresh_rate or 60)
feeds = [feed for feed in self.read(user_id=self.user_id,
error_count__lt=max_error, enabled=True,
- last_retreived__lt=max_last).limit(limit)]
+ last_retrieved__lt=max_last).limit(limit)]
if feeds:
self.update({'id__in': [feed.id for feed in feeds]},
- {'last_retreived': now})
+ {'last_retrieved': now})
return feeds
diff --git a/pyaggr3g470r/models/feed.py b/pyaggr3g470r/models/feed.py
index 28cb2b92..24542c28 100644
--- a/pyaggr3g470r/models/feed.py
+++ b/pyaggr3g470r/models/feed.py
@@ -48,7 +48,7 @@ class Feed(db.Model):
# cache handling
etag = db.Column(db.String(), default="")
last_modified = db.Column(db.String(), default="")
- last_retreived = db.Column(db.DateTime(), default=datetime(1970, 1, 1))
+ last_retrieved = db.Column(db.DateTime(), default=datetime(1970, 1, 1))
# error logging
last_error = db.Column(db.String(), default="")
@@ -72,4 +72,4 @@ class Feed(db.Model):
"etag": self.etag,
"error_count": self.error_count,
"last_modified": self.last_modified,
- "last_retreived": self.last_retreived}
+ "last_retrieved": self.last_retrieved}
diff --git a/pyaggr3g470r/views/api/feed.py b/pyaggr3g470r/views/api/feed.py
index 898e30b0..0d83ea43 100644
--- a/pyaggr3g470r/views/api/feed.py
+++ b/pyaggr3g470r/views/api/feed.py
@@ -16,7 +16,7 @@ FEED_ATTRS = {'title': {'type': str},
'enabled': {'type': bool, 'default': True},
'etag': {'type': str, 'default': ''},
'last_modified': {'type': str},
- 'last_retreived': {'type': str},
+ 'last_retrieved': {'type': str},
'last_error': {'type': str},
'error_count': {'type': int, 'default': 0}}
@@ -24,24 +24,24 @@ FEED_ATTRS = {'title': {'type': str},
class FeedNewAPI(PyAggResourceNew):
controller_cls = FeedController
attrs = FEED_ATTRS
- to_date = ['date', 'last_retreived']
+ to_date = ['date', 'last_retrieved']
class FeedAPI(PyAggResourceExisting):
controller_cls = FeedController
attrs = FEED_ATTRS
- to_date = ['date', 'last_retreived']
+ to_date = ['date', 'last_retrieved']
class FeedsAPI(PyAggResourceMulti):
controller_cls = FeedController
attrs = FEED_ATTRS
- to_date = ['date', 'last_retreived']
+ to_date = ['date', 'last_retrieved']
class FetchableFeedAPI(PyAggAbstractResource):
controller_cls = FeedController
- to_date = ['date', 'last_retreived']
+ to_date = ['date', 'last_retrieved']
attrs = {'max_error': {'type': int, 'default': DEFAULT_MAX_ERROR},
'limit': {'type': int, 'default': DEFAULT_LIMIT}}
bgstack15