diff options
Diffstat (limited to 'lib/tapicero')
-rw-r--r-- | lib/tapicero/loop.rb | 19 | ||||
-rw-r--r-- | lib/tapicero/version.rb | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/lib/tapicero/loop.rb b/lib/tapicero/loop.rb new file mode 100644 index 0000000..9c06e52 --- /dev/null +++ b/lib/tapicero/loop.rb @@ -0,0 +1,19 @@ +module Tapicero + class Loop + def listen(db_name) + loop do + begin + users = CouchRest::Changes.new(db_name) + UserEventHandler.new(users) + users.listen + Tapicero.logger.info('Lost contact with couchdb, will try again in 10 seconds') + sleep 10 + rescue SystemCallError => exc + Tapicero.logger.info('Problem connecting to couchdb (#{exc}). Will try again in 10 seconds.') + sleep 10 + retry + end + end + end + end +end diff --git a/lib/tapicero/version.rb b/lib/tapicero/version.rb index 759b47b..83ed50f 100644 --- a/lib/tapicero/version.rb +++ b/lib/tapicero/version.rb @@ -1,5 +1,5 @@ module Tapicero - VERSION = "0.6" + VERSION = "0.6.1" REQUIRE_PATHS = ['lib'] FLAGS = [] CONFIGS = ['config/default.yaml', '/etc/leap/tapicero.yaml'] |