Hello Ottomata,

I'd like you to do a code review.  Please visit

    https://gerrit.wikimedia.org/r/94291

to review the following change.

Change subject: Move geowiki's name for research MySQL config into separate 
variable
......................................................................

Move geowiki's name for research MySQL config into separate variable

This rephrasing makes follow-up commits that move files around more
readable.

Change-Id: I7ad34931f93f35d58fa7bb1aa14d71387442cae1
---
M manifests/misc/statistics.pp
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/91/94291/1

diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 4e3ab58..18bcfcd 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -844,7 +844,8 @@
     $research_mysql_user = $passwords::mysql::research::user
     $research_mysql_pass = $passwords::mysql::research::pass
 
-    file { "${geowiki_path}/.research.my.cnf":
+    $conf_file = "${geowiki_path}/.research.my.cnf"
+    file { $conf_file:
         owner   => $geowiki_user,
         group   => $geowiki_user,
         mode    => '0400',
@@ -876,6 +877,8 @@
     $geowiki_user = $misc::statistics::geowiki::geowiki_user
     $geowiki_path = $misc::statistics::geowiki::geowiki_path
 
+    $geowiki_mysql_research_conf_file = 
$misc::statistics::geowiki::mysql::conf::research::conf_file
+
     # install MySQL conf files for db acccess
     $globaldev_mysql_user = $passwords::mysql::globaldev::user
     $globaldev_mysql_pass = $passwords::mysql::globaldev::pass
@@ -906,7 +909,7 @@
         minute  => 0,
         hour    => 12,
         user    => $geowiki_user,
-        command => "/usr/bin/python ${geowiki_path}/geowiki/process_data.py -o 
${$geowiki_backups_path} --wpfiles ${geowiki_path}/geowiki/data/all_ids.tsv 
--daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 
day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_path}/.globaldev.my.cnf 
--dest_sql_cnf=${geowiki_path}/.research.my.cnf",
+        command => "/usr/bin/python ${geowiki_path}/geowiki/process_data.py -o 
${$geowiki_backups_path} --wpfiles ${geowiki_path}/geowiki/data/all_ids.tsv 
--daily --start=`date --date='-2 day' +\\%Y-\\%m-\\%d` --end=`date --date='0 
day' +\\%Y-\\%m-\\%d` --source_sql_cnf=${geowiki_path}/.globaldev.my.cnf 
--dest_sql_cnf=${geowiki_mysql_research_conf_file}",
         require => File[$geowiki_backups_path],
     }
 }
@@ -923,6 +926,7 @@
     $geowiki_user = $misc::statistics::geowiki::geowiki_user
     $geowiki_path = $misc::statistics::geowiki::geowiki_path
     $geowiki_data_path = '/a/geowiki-data'
+    $geowiki_mysql_research_conf_file = 
$misc::statistics::geowiki::mysql::conf::research::conf_file
 
     git::clone { 'geowiki-data':
         directory => $geowiki_data_path,
@@ -941,11 +945,11 @@
         minute  => 0,
         hour    => 15,
         user    => $geowiki_user,
-        command => "${geowiki_path}/scripts/make_and_push_limn_files.sh 
--cron-mode --basedir=${geowiki_data_path} 
--source_sql_cnf=${geowiki_path}/.research.my.cnf",
+        command => "${geowiki_path}/scripts/make_and_push_limn_files.sh 
--cron-mode --basedir=${geowiki_data_path} 
--source_sql_cnf=${geowiki_mysql_research_conf_file}",
         require => [
             Git::Clone['geowiki'],
             Git::Clone['geowiki-data'],
-            File["${geowiki_path}/.research.my.cnf"],
+            File[$geowiki_mysql_research_conf_file],
         ],
         ensure  => absent,
     }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ad34931f93f35d58fa7bb1aa14d71387442cae1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: QChris <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>

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

Reply via email to