<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html><head>
<title>Class: JobMgr</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel=StyleSheet href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript" language="JavaScript">
<!--
function popCode(url) {
window.open(url, "Code",
"resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
//-->
</script>
</head>
<body bgcolor="white">
<table summary="Information on class" width="100%" border="0" cellspacing="0">
<tr class="title-row">
<td class="big-title-font">
<sup><font color="aqua">Class</font></sup> JobMgr
</td>
<td align="right">
<table summary="layout" cellspacing="0" cellpadding="2">
<tr valign="top">
<td class="small-title-font">In:</td>
<td class="small-title-font">
<a href="../files/specsaver_rb.html" class="aqua">
specsaver.rb
</a>
<br />
</td>
</tr>
<tr>
<td class="small-title-font">Parent:</td>
<td class="small-title-font">
<a href="SpecMgr.html" class="aqua">
SpecMgr
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- banner header -->
<div class="description"><p>
<a href="SpecMgr.html">SpecMgr</a> subclass for Jobs. Because you can have
a huge number of jobs, we use "p4 jobs -e" to grab only the jobs
that have changed since our saved timestamp. We use <a
href="SpecMgr.html">SpecMgr</a> rather than <a
href="GenSpecMgr.html">GenSpecMgr</a> for reasons I don't really remember.
</p>
</div>
<table summary="Methods" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Methods</td></tr>
</table>
<div class="name-list">
<a href="#M000048">description</a>
<a href="#M000046">list_specs</a>
<a href="#M000047">spec_file</a>
<a href="#M000045">update</a>
</div>
<table summary="Method list" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Public Instance methods</td></tr>
</table>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000045"></a>
<b>update</b>( since )
</td></tr>
</table>
<div class="description">
<p>
Main interface method. Saves each of the modified jobs.
</p>
</div>
<pre class="source">
<span class="cmt"># File specsaver.rb, line 518</span>
<span class="kw">def</span> update( since )
list_specs( since ).each <span class="kw">do</span>
|spec|
save_spec( <span class="str">"job"</span>, spec )
<span class="kw">end</span>
submit( description() )
<span class="kw">end</span>
</pre>
<table summary="Method list" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Protected Instance methods</td></tr>
</table>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000046"></a>
<b>list_specs</b>( stamp )
</td></tr>
</table>
<div class="description">
<p>
Get a list of jobs modified since the saved timestamp
</p>
</div>
<pre class="source">
<span class="cmt"># File specsaver.rb, line 531</span>
<span class="kw">def</span> list_specs( stamp )
@p4t.run_jobs( <span class="str">"-e"</span>, "#{JOB_DATE_FIELD} > #{stamp}" )
<span class="kw">end</span>
</pre>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000047"></a>
<b>spec_file</b>( spec )
</td></tr>
</table>
<div class="description">
<p>
Locate the workspace file for a given job
</p>
</div>
<pre class="source">
<span class="cmt"># File specsaver.rb, line 538</span>
<span class="kw">def</span> spec_file( spec )
@root + <span class="str">"/jobs/"</span> + spec[ <span class="str">"Job"</span> ]
<span class="kw">end</span>
</pre>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000048"></a>
<b>description</b>()
</td></tr>
</table>
<div class="description">
<p>
Provide the description for changelist and stdout.
</p>
</div>
<pre class="source">
<span class="cmt"># File specsaver.rb, line 545</span>
<span class="kw">def</span> description
<span class="str">"Archive updated jobs"</span>
<span class="kw">end</span>
</pre>
</body>
# |
Change |
User |
Description |
Committed |
|
#1
|
3095 |
Tony Smith |
First batch of documentation for specsaver.rb |
|
|