From 35f132fea2801025745c3ca2fba5dc0c3a917146 Mon Sep 17 00:00:00 2001 From: Henri Yandell Date: Fri, 2 Nov 2018 10:54:57 -0700 Subject: [PATCH] Stop considering database errors as stop the bus errors; instead put command on end of queue and keep going --- github-sync-tng/sync.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/github-sync-tng/sync.rb b/github-sync-tng/sync.rb index cd9b242..f60de78 100644 --- a/github-sync-tng/sync.rb +++ b/github-sync-tng/sync.rb @@ -81,6 +81,16 @@ def eval_queue(queue, context, sync_db) else fail=fail+1 end + rescue Sequel::DatabaseError => msg + # Repository access blocked (Octokit::ClientError) + puts "Database error, pushing command back on queue: #{msg}" + queue.push(cmd) + if(fail > limit) + return_code=false + break + else + fail=fail+1 + end end end