Accidentally running full aggregation on chunks and not end of pipeline.

This commit is contained in:
Samuel Clay 2022-06-23 17:50:47 -04:00
parent c38fcc59cf
commit f459944b88
2 changed files with 11 additions and 2 deletions

View file

@ -201,8 +201,6 @@ class UserSubscription(models.Model):
results = pipeline.execute()
if store_stories_key:
r.zunionstore(store_stories_key, unread_ranked_stories_keys, aggregate="MAX")
for hashes in results:
if not isinstance(hashes, list): continue
@ -211,6 +209,9 @@ class UserSubscription(models.Model):
feed_counter += 1
else:
story_hashes.extend(hashes)
if store_stories_key:
r.zunionstore(store_stories_key, unread_ranked_stories_keys, aggregate="MAX")
return story_hashes

View file

@ -146,6 +146,14 @@ backend sentry
server {{host}} {{host}}.node.nyc1.consul:9000
{% endfor %}
backend staging
balance roundrobin
option httpchk GET /_haproxychk
default-server check inter 2000ms resolvers consul resolve-prefer ipv4 resolve-opts allow-dup-ip init-addr none
{% for host in groups.staging %}
server {{host}} {{host}}.node.nyc1.consul:8000
{% endfor %}
backend node_images
option httpchk HEAD /sc,seLJDaKBog3LLEMDe8cjBefMhnVSibO4RA5boZhWcVZ0=/https://samuelclay.com/static/images/2019%20-%20Cuba.jpg
http-check expect rstatus 200|301