Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
tschellenbach committed Oct 29, 2013
1 parent 6af8b3f commit a6d165c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions feedly/feed_managers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ def create_fanout_tasks(self, follower_ids, feed_class, operation, operation_kwa
:param operation_kwargs: kwargs passed to the operation
:param fanout_priority: the priority set to this fanout
'''
fanout_task = self.get_fanout_task(fanout_priority, feed_class=feed_class)
fanout_task = self.get_fanout_task(
fanout_priority, feed_class=feed_class)
if not fanout_task:
return []
chunk_size = self.fanout_chunk_size
Expand Down Expand Up @@ -381,7 +382,8 @@ def batch_import(self, user_id, activities, fanout=True, chunk_size=500):
# now start a big fanout task
if fanout:
logger.info('starting task fanout for chunk %s', index)
follower_ids_by_prio = self.get_user_follower_ids(user_id=user_id)
follower_ids_by_prio = self.get_user_follower_ids(
user_id=user_id)
# create the fanout tasks
operation_kwargs = dict(activities=activity_chunk, trim=False)
for feed_class in self.feed_classes.values():
Expand Down
3 changes: 2 additions & 1 deletion feedly/storage/cassandra/timeline_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def trim(self, key, length, batch_interface=None):
return
last_activity = trim_slice[-1]
if last_activity:
qs = self.model.filter(feed_id=key, activity_id__lt=last_activity[0]).values_list('activity_id')
qs = self.model.filter(
feed_id=key, activity_id__lt=last_activity[0]).values_list('activity_id')
for values in qs.order_by('-activity_id').limit(self.trim_limit):
activity_id = values[0]
self.model(feed_id=key, activity_id=activity_id).batch(
Expand Down
1 change: 0 additions & 1 deletion feedly/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
'password': None
},
}

0 comments on commit a6d165c

Please sign in to comment.