Dzahn has submitted this change and it was merged.

Change subject: Gerrit: Don't use SSH to connect to gsql, we can do it from 
shell itself
......................................................................


Gerrit: Don't use SSH to connect to gsql, we can do it from shell itself

Change-Id: Icbd43d9ce34ca5e068e5a39bb6be9490c4f0d3db
---
M modules/gerrit/manifests/crons.pp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/modules/gerrit/manifests/crons.pp 
b/modules/gerrit/manifests/crons.pp
index db30302..84e01b1 100644
--- a/modules/gerrit/manifests/crons.pp
+++ b/modules/gerrit/manifests/crons.pp
@@ -18,7 +18,7 @@
     cron { 'list_reviewer_counts':
     # This is useful information about the distribution of reviewers.
     # Gerrit's rest api doesn't provide an easy way to get this data.
-        command => "ssh -p 29418 localhost gerrit gsql --format JSON_SINGLE -c 
\"'SELECT changes.change_id AS change_id, COUNT(DISTINCT 
patch_set_approvals.account_id) AS reviewer_count FROM changes LEFT JOIN 
patch_set_approvals ON (changes.change_id = patch_set_approvals.change_id) 
GROUP BY changes.change_id'\" > /var/www/reviewer-counts.json",
+        command => "/usr/bin/java -jar 
/var/lib/gerrit2/review_site/bin/gerrit.war gsql -d 
/var/lib/gerrit2/review_site/ --format JSON_SINGLE -c \"'SELECT 
changes.change_id AS change_id, COUNT(DISTINCT patch_set_approvals.account_id) 
AS reviewer_count FROM changes LEFT JOIN patch_set_approvals ON 
(changes.change_id = patch_set_approvals.change_id) GROUP BY 
changes.change_id'\" > /var/www/reviewer-counts.json",
         user    => 'gerrit2',
         hour    => 1,
     }

-- 
To view, visit https://gerrit.wikimedia.org/r/298043
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbd43d9ce34ca5e068e5a39bb6be9490c4f0d3db
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to