Milimetric has submitted this change and it was merged.

Change subject: Add caching option to monitoring script
......................................................................


Add caching option to monitoring script

Change-Id: I444fe8e3a25b09ef579283499ef08bd8342a062d
---
M scripts/check_web_page.sh
1 file changed, 11 insertions(+), 1 deletion(-)

Approvals:
  Milimetric: Verified; Looks good to me, approved



diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh
index 1176683..d91aa55 100755
--- a/scripts/check_web_page.sh
+++ b/scripts/check_web_page.sh
@@ -77,6 +77,8 @@
 # copies instead of fetching the files again and again for each
 # run. Files do not get removed upon script exit. This is only useful
 # when debugging/developing the script.
+#
+# (You can use the --cache parameter to set USE_CACHE=yes temporarily)
 USE_CACHE=no
 #USE_CACHE=yes
 
@@ -98,6 +100,11 @@
 
 OPTIONS:
 --help, -h       -- prints this help page
+--cache          -- cache the downloaded documents into /tmp/geowiki_monitor...
+                    and reuse them on subsequent runs. This is useful
+                    for debugging the script. But you'll have to
+                    cleanup the /tmp/geowiki_monitor... files by hand
+                    on your own.
 
 EOF
 }
@@ -109,7 +116,7 @@
 #   $1, $2, ... arguments that should get processed
 #
 # Output:
-#   -
+#   USE_CACHE
 #
 parse_arguments() {
     while [ $# -gt 0 ]
@@ -121,6 +128,9 @@
                 print_help
                 exit 0
                 ;;
+            "--cache" )
+                USE_CACHE="yes"
+                ;;
            * )
                error "unknown argument '$ARGUMENT'"
         esac

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I444fe8e3a25b09ef579283499ef08bd8342a062d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/geowiki
Gerrit-Branch: master
Gerrit-Owner: QChris <christ...@quelltextlich.at>
Gerrit-Reviewer: Milimetric <dandree...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to