[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: More fixups to httpyaml hiera backend
Yuvipanda has submitted this change and it was merged. Change subject: labs: More fixups to httpyaml hiera backend .. labs: More fixups to httpyaml hiera backend Change-Id: If7155d50b15bcb4af2ea367c894abbdae44837b5 --- M modules/wmflib/lib/hiera/httpcache.rb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/wmflib/lib/hiera/httpcache.rb b/modules/wmflib/lib/hiera/httpcache.rb index 8a8867d..ca5e8f6 100644 --- a/modules/wmflib/lib/hiera/httpcache.rb +++ b/modules/wmflib/lib/hiera/httpcache.rb @@ -18,7 +18,7 @@ end end -def read(path, _, _) +def read(path, _=nil, _=nil) read_file(path) rescue => detail # When failing to read data, we raise an exception, see https://phabricator.wikimedia.org/T78408 -- To view, visit https://gerrit.wikimedia.org/r/310687 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7155d50b15bcb4af2ea367c894abbdae44837b5 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: YuvipandaGerrit-Reviewer: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: More fixups to httpyaml hiera backend
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/310687 Change subject: labs: More fixups to httpyaml hiera backend .. labs: More fixups to httpyaml hiera backend Change-Id: If7155d50b15bcb4af2ea367c894abbdae44837b5 --- M modules/wmflib/lib/hiera/httpcache.rb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/87/310687/1 diff --git a/modules/wmflib/lib/hiera/httpcache.rb b/modules/wmflib/lib/hiera/httpcache.rb index 8a8867d..ca5e8f6 100644 --- a/modules/wmflib/lib/hiera/httpcache.rb +++ b/modules/wmflib/lib/hiera/httpcache.rb @@ -18,7 +18,7 @@ end end -def read(path, _, _) +def read(path, _=nil, _=nil) read_file(path) rescue => detail # When failing to read data, we raise an exception, see https://phabricator.wikimedia.org/T78408 -- To view, visit https://gerrit.wikimedia.org/r/310687 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7155d50b15bcb4af2ea367c894abbdae44837b5 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: More fixups to httpyaml hiera backend
Yuvipanda has submitted this change and it was merged. Change subject: labs: More fixups to httpyaml hiera backend .. labs: More fixups to httpyaml hiera backend Debug by pushing commits Change-Id: I7d8db33d83a29ea227f18c00ab5dcef726344426 --- M modules/wmflib/lib/hiera/httpcache.rb 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/wmflib/lib/hiera/httpcache.rb b/modules/wmflib/lib/hiera/httpcache.rb index 6d857cd..8a8867d 100644 --- a/modules/wmflib/lib/hiera/httpcache.rb +++ b/modules/wmflib/lib/hiera/httpcache.rb @@ -18,7 +18,7 @@ end end -def read(path) +def read(path, _, _) read_file(path) rescue => detail # When failing to read data, we raise an exception, see https://phabricator.wikimedia.org/T78408 @@ -47,15 +47,15 @@ now = Time.now.to_i if @cache[path].nil? @cache[path] = {:data => nil, :meta => {:ts => now}} -return True +return true elsif (now - @cache[path][:meta][:ts]) <= @stat_ttl # if we already fetched the result within the last stat_ttl seconds, # we don't bother killing the mediawiki instance with a flood of requests -return False +return false else # This means there's a ts and it's old enough @cache[path][:meta][:ts] = now -return True +return true end end -- To view, visit https://gerrit.wikimedia.org/r/310678 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d8db33d83a29ea227f18c00ab5dcef726344426 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: YuvipandaGerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: More fixups to httpyaml hiera backend
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/310678 Change subject: labs: More fixups to httpyaml hiera backend .. labs: More fixups to httpyaml hiera backend Debug by pushing commits Change-Id: I7d8db33d83a29ea227f18c00ab5dcef726344426 --- M modules/wmflib/lib/hiera/httpcache.rb 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/78/310678/1 diff --git a/modules/wmflib/lib/hiera/httpcache.rb b/modules/wmflib/lib/hiera/httpcache.rb index 6d857cd..8a8867d 100644 --- a/modules/wmflib/lib/hiera/httpcache.rb +++ b/modules/wmflib/lib/hiera/httpcache.rb @@ -18,7 +18,7 @@ end end -def read(path) +def read(path, _, _) read_file(path) rescue => detail # When failing to read data, we raise an exception, see https://phabricator.wikimedia.org/T78408 @@ -47,15 +47,15 @@ now = Time.now.to_i if @cache[path].nil? @cache[path] = {:data => nil, :meta => {:ts => now}} -return True +return true elsif (now - @cache[path][:meta][:ts]) <= @stat_ttl # if we already fetched the result within the last stat_ttl seconds, # we don't bother killing the mediawiki instance with a flood of requests -return False +return false else # This means there's a ts and it's old enough @cache[path][:meta][:ts] = now -return True +return true end end -- To view, visit https://gerrit.wikimedia.org/r/310678 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d8db33d83a29ea227f18c00ab5dcef726344426 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits