taskflow/taskflow/tests/unit/worker_based
Joshua Harlow cea71f2799 Fix for WBE sporadic timeout of tasks
This fixes the sporadic of tasks that would happen
under certain circumstances. What happened was that
a new worker notification would be sent to a callback
while at the same time a task submission would come in
and there would be a small race period where the task
would insert itself into the requests cache while the
callback was processing.

So to work around this the whole concept of a requests
cache was revamped and now the WBE executor just maintains
its own local dictionary of ongoing requests and accesses
it safely.

During the on_wait function that is periodically called
by kombu the previous expiry of work happens but now any
requests that are pending are matched to any new workers
that may have appeared.

This avoids the race (and ensures that even if a new
worker is found but a submission is in progress that the
duration until that submission happens will only be until
the next on_wait call happens).

Related-Bug: #1431097

Change-Id: I98b0caeedc77ab2f7214847763ae1eb0433d4a78
2016-02-05 14:40:25 -08:00
..
__init__.py Removed copyright from empty files 2014-02-22 17:16:29 +08:00
test_creation.py Fix order of assertEqual for unit.worker_based 2015-10-17 09:08:35 +00:00
test_dispatcher.py Make the dispatcher handler be an actual type 2015-02-15 20:21:24 -08:00
test_endpoint.py Fix order of assertEqual for unit.worker_based 2015-10-17 09:08:35 +00:00
test_executor.py Fix for WBE sporadic timeout of tasks 2016-02-05 14:40:25 -08:00
test_message_pump.py Remove 2.6 classifier + 2.6 compatibility code 2015-06-21 09:39:12 -07:00
test_pipeline.py Bump futurist and remove waiting code in taskflow 2015-07-25 18:54:22 -07:00
test_protocol.py Handle cases where exc_args can't be serialized as JSON in the WBE 2016-01-28 16:29:03 -06:00
test_proxy.py Fix order of assertEqual for unit.worker_based 2015-10-17 09:08:35 +00:00
test_server.py Fix order of assertEqual for unit.worker_based 2015-10-17 09:08:35 +00:00
test_types.py Fix for WBE sporadic timeout of tasks 2016-02-05 14:40:25 -08:00
test_worker.py Fix order of assertEqual for unit.worker_based 2015-10-17 09:08:35 +00:00