Implement fact receiver thread worker

Optionally allow processing of fact receiver messages in a worker
thread.  This works around an issue where data could take a while to
page into Mongo and cross the zmq socket timeout.
This commit is contained in:
Matthew Jones
2015-08-28 10:59:52 -04:00
parent 64b65edf2c
commit 2f39393cf3
2 changed files with 8 additions and 3 deletions
@@ -142,7 +142,7 @@ class RunFactCacheReceiverUnitTest(BaseTest, MongoDBRequired):
receiver = FactCacheReceiver()
receiver.process_fact_message = MagicMock(name='process_fact_message')
receiver.run_receiver()
receiver.run_receiver(use_processing_threads=False)
receiver.process_fact_message.assert_called_once_with(TEST_MSG)