Author: justi9
Date: 2010-07-13 17:01:16 -0400 (Tue, 13 Jul 2010)
New Revision: 4113
Modified:
mgmt/newdata/cumin/python/cumin/grid/submission.py
mgmt/newdata/cumin/python/cumin/main.py
Log:
Add extra attrs field to submission task; fix an import-related error
Modified: mgmt/newdata/cumin/python/cumin/grid/submission.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-07-13 19:39:46 UTC (rev 4112)
+++ mgmt/newdata/cumin/python/cumin/grid/submission.py 2010-07-13 21:01:16 UTC (rev 4113)
@@ -87,7 +87,8 @@
iwd=None,
stdin=None,
stdout=None,
- stderr=None):
+ stderr=None,
+ extra_attrs={}):
# XXX
# user_name = invoc.user.name
user_name = "gridmonkey"
@@ -107,6 +108,9 @@
put("Requirements", requirements)
put("JobUniverse", universe)
+ for name, value in extra_attrs:
+ put(name, value)
+
descriptors = dict()
descriptors["Requirements"] = "com.redhat.grid.Expression"
Modified: mgmt/newdata/cumin/python/cumin/main.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/main.py 2010-07-13 19:39:46 UTC (rev 4112)
+++ mgmt/newdata/cumin/python/cumin/main.py 2010-07-13 21:01:16 UTC (rev 4113)
@@ -89,7 +89,6 @@
def add_pages(self):
self.main_page = MainPage(self, "index.html")
- self.main_page.page_html_class = "Cumin"
self.add_page(self.main_page)
self.set_default_page(self.main_page)
@@ -377,7 +376,7 @@
def render_cell_content(self, session, record):
created = self.field.get_content(session, record)
- return fmt_duration(time() - secs(created))
+ return fmt_duration(time.time() - secs(created))
def render_text_align(self, session):
return "right"