Please sign in to comment.
link votes: Use a queue to update links by domain queries
The queue can be sharded by domain to minimize lock contention and the consumer will batch updates to the same links (e.g. several votes for the same link) and to the same domain (e.g. votes for different links to a single domain).
- Loading branch information...
Showing with 88 additions and 24 deletions.
|@@ -0,0 +1,14 @@|
|+description "update links by domain precomputed queries"|
|+stop on reddit-stop or runlevel |
|+respawn limit 10 5|
|+ . /etc/default/reddit|
|+ wrap-job paster run --proctitle domain_query_q$x $REDDIT_INI $REDDIT_ROOT/r2/lib/voting.py -c "consume_domain_query_queue()"|