aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--migrations/versions/4b5c161e1ced_.py4
-rw-r--r--pyaggr3g470r/controllers/feed.py4
-rw-r--r--pyaggr3g470r/models/feed.py4
-rw-r--r--pyaggr3g470r/views/api/feed.py10
4 files changed, 11 insertions, 11 deletions
diff --git a/migrations/versions/4b5c161e1ced_.py b/migrations/versions/4b5c161e1ced_.py
index 6f591e7e..9abed84b 100644
--- a/migrations/versions/4b5c161e1ced_.py
+++ b/migrations/versions/4b5c161e1ced_.py
@@ -23,7 +23,7 @@ def upgrade():
op.add_column('feed', sa.Column('last_error', sa.String(), nullable=True))
op.add_column('feed', sa.Column('last_modified', sa.DateTime(),
nullable=True, default=unix_start, server_default=str(unix_start)))
- op.add_column('feed', sa.Column('last_retreived', sa.DateTime(),
+ op.add_column('feed', sa.Column('last_retrieved', sa.DateTime(),
nullable=True, default=unix_start, server_default=str(unix_start)))
op.add_column('feed', sa.Column('etag', sa.String(), nullable=True))
op.add_column('user', sa.Column('refresh_rate', sa.Integer(),
@@ -37,6 +37,6 @@ def downgrade():
op.drop_column('feed', 'last_modified')
op.drop_column('feed', 'last_error')
op.drop_column('feed', 'error_count')
- op.drop_column('feed', 'last_retreived')
+ op.drop_column('feed', 'last_retrieved')
op.drop_column('feed', 'etag')
# end Alembic commands ###
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