a68b5972f5

Instead of just maintaining a simple boolean that denotes whether the thread is connected or not, expose a more rich set of state transitions that can be used by external users to know exactly the state the thread is currently in. This new list is: * IDLE (not initialized/started running) * DISCONNECTED (not connected to gerrit) * CONNECTING (attempting to connect) * CONNECTED (connected to gerrit) * CONSUMING (consuming events from gerrit) * DEAD (thread has exited its run method) The state transitions are the following: IDLE -> DISCONNECTED DISCONNECTED -> CONNECTING CONNECTING -> CONNECTED CONNECTED -> CONSUMING CONSUMING -> DISCONNECTED (on consuming failure) CONNECTING -> DEAD (if no more retries) Change-Id: Ib4ecef4f093b6d6925bc4b553020e15111248617
Description
Languages
Python
100%