9135: Make EventClient initialization more consistent. 9135-restore-eventclient-api-wip
authorBrett Smith <brett@curoverse.com>
Thu, 5 May 2016 21:25:39 +0000 (17:25 -0400)
committerBrett Smith <brett@curoverse.com>
Thu, 5 May 2016 21:25:39 +0000 (17:25 -0400)
commit441cb401a907ebca19042f73942a76d247bab847
treed91724729196841ecf54c421647ee380ed892fdb
parent67bc8ded4ab0d00ca464d360d93d1eed29844e6f
9135: Make EventClient initialization more consistent.

* DRY up the setup code.
* Make the client a daemon thread, for consistency with PollClient.
* Always try to close the connection on failure.  We do this in
  _subscribe_websocket, so why not do it on reconnect as well?
* Remove the public connect() and close_connection() methods from
  EventClient.  They're no longer needed, and avoid leaking
  implementation details.
sdk/python/arvados/events.py
sdk/python/tests/test_events.py