Lock test tweaks

- Use the lock provided reader/writer constants
  to differentiate on.
- Add a fake amount of work time to simulate some
  activity happening when acquiring the lock.

Change-Id: I8c6c2db35d4c3324a6476e45399b6fa6f91a61e1
Avoid calling callbacks while holding locks

Instead of calling the callback while holding
a write lock (a recipe for deadlock) call the
callbacks after we pop all the values to avoid
any potential for deadlock.

Change-Id: Idb4275d8f07d60e2ed83c0987b6c7354a09c8a71
Update request `expired` property docsting

Change-Id: If5a9881227e3fe5484df63b3117e078321365699
Add base class for Retry

Change-Id: Ia0e467bd87c7830c90d3054f7b6a54368c3e018b
Add retry to Flow patterns

Implement dependency checks when adding items to flows:
- retry can't be depended on tasks from it's subflow.
- retry can't provide same values as tasks or other retries

Change-Id: Iffa8e673fd2de39407ae22cd38ad523d484cbba7
Add retry to execution graph

Change-Id: I8d9a608257fee66c462bd45150383774a93e90b0
Extend logbook and storage to work with retry

- Store AtomType in TaskDetail (TASK_DETAIL or RETRY_DETAIL)
- Extend storage to work with retries
- Add alembic migration for database

Change-Id: I07896d4b79ebe5de33f65e00a3bd32af543a09b4
Add retry action to execute retries

Change-Id: I093a49f88d9eecea5eb88fcecad9f7825cd7cb33
Introduce message types for WBE protocol

* Abstract message class added - all messages types are
  derived from it now and have to implement the `to_dict`
  method, so it can be serialized and transferred with
  broker;
* Implemented the `Response` message type, that restores
  failures from dictionary on creation;
* Corrected and improved unit tests;

Change-Id: I10e017a613f0422420d0244b9f8786f988863107
Merge "Avoid calling callbacks while holding locks"
Merge "Lock test tweaks"
Merge "Update request `expired` property docsting"
Merge "Introduce message types for WBE protocol"
docs: Add inheritance diagram to exceptions documentation

In light of exception hierarchy adjustments currently in progress
(I0e1e81b513fbbc7adb8bfaa1244993e345ab70d3) it becomes really helpful to
have inheritance diagram for exceptions in documentation.

Change-Id: Ie8f7b160de08fa8a91499cac2f94a76aff186e67
Add tox environment for pypy

Because some of our dependencies (notably psycopg2) are not supported
by pypy we have to add special tox evnironment explicitly.

Partial-bug: 1293585
Change-Id: I6e3fd38e05dc5a388894687b51234934cae6a6b7
[WBE] Collect information from workers

* Added the `Notify` message type. Used to notify workers
  about executor has been started and to receive workers
  information back (topic and tasks list);
* Implemented `WorkersCache` to interact with workers
  information easly;
* Got rid of the engine `workers_info` parameter.

Change-Id: I4a810b1ddb0b04c11d12b47afc5f9cdf77d070be
Merge "Add base class for Retry"
Merge "Add retry to Flow patterns"
Merge "Add retry to execution graph"
Merge "Extend logbook and storage to work with retry"