about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-22 21:38:47 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-22 21:38:47 +0100
commit12559b01eae408c0f3e820ef9c6bc6e356ab889a (patch)
tree87d857393ce24b1937c654ce7252b6315b7e77f9 /app/services
parent02e4fb2e06f424c16ab25ea294a4af6490a5f7e3 (diff)
Add pagination by max_id instead of offset/limit
Diffstat (limited to 'app/services')
-rw-r--r--app/services/fan_out_on_write_service.rb2
-rw-r--r--app/services/precompute_feed_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb
index 45814cfb5..62cf2a1fe 100644
--- a/app/services/fan_out_on_write_service.rb
+++ b/app/services/fan_out_on_write_service.rb
@@ -31,7 +31,7 @@ class FanOutOnWriteService < BaseService
   end
 
   def push(type, receiver_id, status)
-    redis.zadd(key(type, receiver_id), status.created_at.to_i, status.id)
+    redis.zadd(key(type, receiver_id), status.id, status.id)
     trim(type, receiver_id)
   end
 
diff --git a/app/services/precompute_feed_service.rb b/app/services/precompute_feed_service.rb
index 0fb33db23..9d3b8d370 100644
--- a/app/services/precompute_feed_service.rb
+++ b/app/services/precompute_feed_service.rb
@@ -14,7 +14,7 @@ class PrecomputeFeedService < BaseService
   private
 
   def push(type, receiver_id, status)
-    redis.zadd(key(type, receiver_id), status.created_at.to_i, status.id)
+    redis.zadd(key(type, receiver_id), status.id, status.id)
   end
 
   def home(account)