Joshua Harlow a68b5972f5 Expose the gerrit watcher as a thread with defined transitions
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
2014-02-01 22:10:26 -08:00
2013-10-03 10:45:10 +13:00
2012-12-16 10:40:40 -08:00
2012-07-11 13:00:12 -07:00
2013-06-02 10:46:12 -04:00
2013-10-19 10:51:20 -04:00
2013-06-02 10:46:12 -04:00
2013-10-27 18:36:33 -04:00
2013-10-19 10:51:20 -04:00
2013-06-02 10:46:12 -04:00

gerritlib

A Python library for interacting with Gerrit.

Description
Library for Gerrit
Readme 1.1 MiB
Languages
Python 100%