From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D89F4138247 for ; Sat, 18 Jan 2014 12:10:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 752EAE0C7C; Sat, 18 Jan 2014 12:10:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8F64AE0C79 for ; Sat, 18 Jan 2014 12:10:48 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B13A033F94F for ; Sat, 18 Jan 2014 12:10:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 7066818730 for ; Sat, 18 Jan 2014 12:10:45 +0000 (UTC) From: "Alex Legler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alex Legler" Message-ID: <1389716664.0d3ec0cbeb392e1f226ff9b293552c9131b7c6fd.a3li@gentoo> Subject: [gentoo-commits] proj/infra-status:master commit in: lib/ X-VCS-Repository: proj/infra-status X-VCS-Files: lib/service_registry.rb X-VCS-Directories: lib/ X-VCS-Committer: a3li X-VCS-Committer-Name: Alex Legler X-VCS-Revision: 0d3ec0cbeb392e1f226ff9b293552c9131b7c6fd X-VCS-Branch: master Date: Sat, 18 Jan 2014 12:10:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 59d28c9c-5b01-4ae4-aabd-05d713309abe X-Archives-Hash: 23861cd05184d3852eb11310bd235a45 commit: 0d3ec0cbeb392e1f226ff9b293552c9131b7c6fd Author: Alex Legler a3li li> AuthorDate: Tue Jan 14 16:24:24 2014 +0000 Commit: Alex Legler gentoo org> CommitDate: Tue Jan 14 16:24:24 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/infra-status.git;a=commit;h=0d3ec0cb Rescue JSON parse failures In case of an error, set a date in the past to retry next request. --- lib/service_registry.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/service_registry.rb b/lib/service_registry.rb index f21a74a..19734e3 100644 --- a/lib/service_registry.rb +++ b/lib/service_registry.rb @@ -98,6 +98,10 @@ class ServiceRegistry load(File.join(File.dirname(__FILE__), '..', 'data', 'services.rb')) @load_date = DateTime.now @cache_locked = false + rescue Exception + @services = {} + @load_date = DateTime.new(2000, 1, 1) + @cache_locked = false end private From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CE44C138247 for ; Thu, 16 Jan 2014 16:43:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 92969E0B77; Thu, 16 Jan 2014 16:43:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 01FE0E0B7D for ; Thu, 16 Jan 2014 16:43:42 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 342F233F818 for ; Thu, 16 Jan 2014 16:43:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 12A771874F for ; Thu, 16 Jan 2014 16:43:40 +0000 (UTC) From: "Alex Legler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alex Legler" Message-ID: <1389716664.0d3ec0cbeb392e1f226ff9b293552c9131b7c6fd.a3li@gentoo> Subject: [gentoo-commits] proj/infra-status:master commit in: lib/ X-VCS-Repository: proj/infra-status X-VCS-Files: lib/service_registry.rb X-VCS-Directories: lib/ X-VCS-Committer: a3li X-VCS-Committer-Name: Alex Legler X-VCS-Revision: 0d3ec0cbeb392e1f226ff9b293552c9131b7c6fd X-VCS-Branch: master Date: Thu, 16 Jan 2014 16:43:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 05a08e07-a6e3-4395-a12d-1f117d7562f7 X-Archives-Hash: 8c466024b94418dd2cc8f2207f2ec35c Message-ID: <20140116164340.GG6O8weL3aX5JAevDac2pb6VOWzXQVluBuugx4qz7oU@z> commit: 0d3ec0cbeb392e1f226ff9b293552c9131b7c6fd Author: Alex Legler a3li li> AuthorDate: Tue Jan 14 16:24:24 2014 +0000 Commit: Alex Legler gentoo org> CommitDate: Tue Jan 14 16:24:24 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/infra-status.git;a=commit;h=0d3ec0cb Rescue JSON parse failures In case of an error, set a date in the past to retry next request. --- lib/service_registry.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/service_registry.rb b/lib/service_registry.rb index f21a74a..19734e3 100644 --- a/lib/service_registry.rb +++ b/lib/service_registry.rb @@ -98,6 +98,10 @@ class ServiceRegistry load(File.join(File.dirname(__FILE__), '..', 'data', 'services.rb')) @load_date = DateTime.now @cache_locked = false + rescue Exception + @services = {} + @load_date = DateTime.new(2000, 1, 1) + @cache_locked = false end private