]> scripts.mit.edu Git - wizard.git/commitdiff
Add closer logging to wizard.deploy.web and related code; add refresh script.
authorEdward Z. Yang <ezyang@mit.edu>
Sun, 11 Jul 2010 04:34:44 +0000 (00:34 -0400)
committerEdward Z. Yang <ezyang@mit.edu>
Sun, 11 Jul 2010 04:34:44 +0000 (00:34 -0400)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
plugins/scripts/wizard_scripts.py
refresh.sh [new file with mode: 0755]
wizard/deploy.py

index 45fadbd62fcc744362ca5b7a6afde3495634ebd2..4a9a0841457337d434f92911a97b204bdbb63cbf 100644 (file)
@@ -27,6 +27,8 @@ def deploy_web(dir):
                 "scripts.mit.edu",
                 "/~" + util.get_dir_owner(homedir) + web_path.rstrip('/'),
                 "", "", "")
+    else:
+        logging.info("Directory location did not contain web_scripts: %s", dir)
 
 def user_quota(dir=None):
     """
diff --git a/refresh.sh b/refresh.sh
new file mode 100755 (executable)
index 0000000..5b6f497
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+python setup.py egg_info
+cd plugins/scripts
+python setup.py egg_info
index d559c79afcb28a8840d7747ce2d430cc96344c06..0b6be56a255d4100e1b3c5e90c148c18a357efcb 100644 (file)
@@ -86,25 +86,32 @@ def web(dir, url=None):
     if url:
         if isinstance(url, str):
             url = urlparse.urlparse(url)
+        logging.info("wizard.deploy.web: Using URL %s", url)
         yield url
         return
 
     for entry in pkg_resources.iter_entry_points("wizard.deploy.web"):
+        logging.debug("wizard.deploy.web: Processing %s", entry)
         f = entry.load()
         for r in f(dir):
             if isinstance(r, str):
                 r = urlparse.urlparse(r)
+            logging.info("wizard.deploy.web: Using URL %s", r)
             yield r
 
     # try the environment
     host = os.getenv("WIZARD_WEB_HOST")
     path = os.getenv("WIZARD_WEB_PATH")
     if host is not None and path is not None:
-        yield urlparse.ParseResult(
-                    "http",
-                    host,
-                    path.rstrip('/'),
-                    "", "", "")
+        r = urlparse.ParseResult(
+                "http",
+                host,
+                path.rstrip('/'),
+                "", "", "")
+        logging.info("wizard.deploy.web: Using URL %s", r)
+        yield r
+
+    logging.info("wizard.deploy.web: Exhausted URLs")
 
 ## -- Model Objects --