Skip to content

Commit

Permalink
Merge pull request #182 from jeremycline/no-shuffle
Browse files Browse the repository at this point in the history
Stop trying to shuffle preferences in the worker consumer
  • Loading branch information
jeremycline committed Apr 25, 2017
2 parents 4e04cd2 + 90f9f42 commit 172145b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fmn/consumer/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import json
import logging
import time
import random

from dogpile.cache import make_region
from fedmsg_meta_fedora_infrastructure import fasshim
Expand Down Expand Up @@ -151,11 +150,6 @@ def callback(ch, method, properties, body):
ch.basic_ack(delivery_tag=method.delivery_tag)
return

# Shuffle it so that not all threads step through the list in the same
# order. This should cut down on competition for the dogpile lock when
# getting pkgdb info at startup.
random.shuffle(PREFS)

# And do the real work of comparing every rule against the message.
t = time.time()
results = fmn.lib.recipients(PREFS, msg, valid_paths, CONFIG)
Expand Down

0 comments on commit 172145b

Please sign in to comment.