doc/TaskJuggler/ProcessIntercom.html in taskjuggler-0.0.8 vs doc/TaskJuggler/ProcessIntercom.html in taskjuggler-0.0.9

- old
+ new

@@ -134,10 +134,12 @@ <li><a href="../TaskJuggler/AttributeBase.html">TaskJuggler::AttributeBase</a></li> <li><a href="../TaskJuggler/AttributeDefinition.html">TaskJuggler::AttributeDefinition</a></li> + <li><a href="../TaskJuggler/AttributeOverwrite.html">TaskJuggler::AttributeOverwrite</a></li> + <li><a href="../TaskJuggler/BatchProcessor.html">TaskJuggler::BatchProcessor</a></li> <li><a href="../TaskJuggler/Booking.html">TaskJuggler::Booking</a></li> <li><a href="../TaskJuggler/BookingListAttribute.html">TaskJuggler::BookingListAttribute</a></li> @@ -212,10 +214,12 @@ <li><a href="../TaskJuggler/HTMLGraphics.html">TaskJuggler::HTMLGraphics</a></li> <li><a href="../TaskJuggler/Interval.html">TaskJuggler::Interval</a></li> + <li><a href="../TaskJuggler/IntervalList.html">TaskJuggler::IntervalList</a></li> + <li><a href="../TaskJuggler/IntervalListAttribute.html">TaskJuggler::IntervalListAttribute</a></li> <li><a href="../TaskJuggler/JobInfo.html">TaskJuggler::JobInfo</a></li> <li><a href="../TaskJuggler/Journal.html">TaskJuggler::Journal</a></li> @@ -244,10 +248,12 @@ <li><a href="../TaskJuggler/LogicalExpression.html">TaskJuggler::LogicalExpression</a></li> <li><a href="../TaskJuggler/LogicalExpressionAttribute.html">TaskJuggler::LogicalExpressionAttribute</a></li> + <li><a href="../TaskJuggler/LogicalExpressionListAttribute.html">TaskJuggler::LogicalExpressionListAttribute</a></li> + <li><a href="../TaskJuggler/LogicalFlag.html">TaskJuggler::LogicalFlag</a></li> <li><a href="../TaskJuggler/LogicalFunction.html">TaskJuggler::LogicalFunction</a></li> <li><a href="../TaskJuggler/LogicalOperation.html">TaskJuggler::LogicalOperation</a></li> @@ -524,10 +530,12 @@ <li><a href="../TaskJuggler/VimSyntax.html">TaskJuggler::VimSyntax</a></li> <li><a href="../TaskJuggler/WebServer.html">TaskJuggler::WebServer</a></li> + <li><a href="../TaskJuggler/WelcomePage.html">TaskJuggler::WelcomePage</a></li> + <li><a href="../TaskJuggler/WorkingHours.html">TaskJuggler::WorkingHours</a></li> <li><a href="../TaskJuggler/WorkingHoursAttribute.html">TaskJuggler::WorkingHoursAttribute</a></li> <li><a href="../TaskJuggler/XMLBlob.html">TaskJuggler::XMLBlob</a></li> @@ -550,12 +558,10 @@ <li><a href="../RuntimeConfig.html">RuntimeConfig</a></li> <li><a href="../String.html">String</a></li> - <li><a href="../StringIO.html">StringIO</a></li> - </ul> <div id="no-class-search-results" style="display: none;">No matching classes.</div> </div> @@ -599,21 +605,21 @@ <div class="method-source-code" id="check-ey-source"> <pre> - <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 112</span> -112: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkKey</span>(<span class="ruby-identifier">authKey</span>, <span class="ruby-identifier">command</span>) -113: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">authKey</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@authKey</span> -114: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;Accepted authentication key for command '#{command}'&quot;</span>) -115: <span class="ruby-keyword kw">else</span> -116: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">warning</span>(<span class="ruby-node">&quot;Rejected wrong authentication key #{authKey}&quot;</span> <span class="ruby-operator">+</span> -117: <span class="ruby-node">&quot;for command '#{command}'&quot;</span>) -118: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> -119: <span class="ruby-keyword kw">end</span> -120: <span class="ruby-keyword kw">true</span> -121: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 114</span> +114: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkKey</span>(<span class="ruby-identifier">authKey</span>, <span class="ruby-identifier">command</span>) +115: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">authKey</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@authKey</span> +116: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;Accepted authentication key for command '#{command}'&quot;</span>) +117: <span class="ruby-keyword kw">else</span> +118: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">warning</span>(<span class="ruby-node">&quot;Rejected wrong authentication key #{authKey}&quot;</span> <span class="ruby-operator">+</span> +119: <span class="ruby-node">&quot;for command '#{command}'&quot;</span>) +120: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> +121: <span class="ruby-keyword kw">end</span> +122: <span class="ruby-keyword kw">true</span> +123: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -640,28 +646,28 @@ <div class="method-source-code" id="connect-source"> <pre> - <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 78</span> -78: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connect</span>(<span class="ruby-identifier">stdout</span>, <span class="ruby-identifier">stderr</span>, <span class="ruby-identifier">stdin</span>, <span class="ruby-identifier">silent</span>) -79: <span class="ruby-comment cmt"># Set the client lock.</span> -80: <span class="ruby-ivar">@clientConnection</span>.<span class="ruby-identifier">lock</span> -81: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Rerouting ProjectServer standard IO to client'</span>) -82: <span class="ruby-comment cmt"># Make sure that all output to STDOUT and STDERR is sent to the client.</span> -83: <span class="ruby-comment cmt"># Input is read from the client STDIN. We save a copy of the old file</span> -84: <span class="ruby-comment cmt"># handles so we can restore then later again.</span> -85: <span class="ruby-ivar">@stdout</span> = <span class="ruby-identifier">$stdout</span> -86: <span class="ruby-ivar">@stderr</span> = <span class="ruby-identifier">$stderr</span> -87: <span class="ruby-ivar">@stdin</span> = <span class="ruby-identifier">$stdin</span> -88: <span class="ruby-identifier">$stdout</span> = <span class="ruby-identifier">stdout</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stdout</span> -89: <span class="ruby-identifier">$stderr</span> = <span class="ruby-identifier">stderr</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stdout</span> -90: <span class="ruby-identifier">$stdin</span> = <span class="ruby-identifier">stdin</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stdin</span> -91: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'IO is now routed to the client'</span>) -92: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">silent</span> = <span class="ruby-identifier">silent</span> -93: <span class="ruby-keyword kw">true</span> -94: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 80</span> +80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connect</span>(<span class="ruby-identifier">stdout</span>, <span class="ruby-identifier">stderr</span>, <span class="ruby-identifier">stdin</span>, <span class="ruby-identifier">silent</span>) +81: <span class="ruby-comment cmt"># Set the client lock.</span> +82: <span class="ruby-ivar">@clientConnection</span>.<span class="ruby-identifier">lock</span> +83: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Rerouting ProjectServer standard IO to client'</span>) +84: <span class="ruby-comment cmt"># Make sure that all output to STDOUT and STDERR is sent to the client.</span> +85: <span class="ruby-comment cmt"># Input is read from the client STDIN. We save a copy of the old file</span> +86: <span class="ruby-comment cmt"># handles so we can restore then later again.</span> +87: <span class="ruby-ivar">@stdout</span> = <span class="ruby-identifier">$stdout</span> +88: <span class="ruby-ivar">@stderr</span> = <span class="ruby-identifier">$stderr</span> +89: <span class="ruby-ivar">@stdin</span> = <span class="ruby-identifier">$stdin</span> +90: <span class="ruby-identifier">$stdout</span> = <span class="ruby-identifier">stdout</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stdout</span> +91: <span class="ruby-identifier">$stderr</span> = <span class="ruby-identifier">stderr</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stdout</span> +92: <span class="ruby-identifier">$stdin</span> = <span class="ruby-identifier">stdin</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stdin</span> +93: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'IO is now routed to the client'</span>) +94: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">silent</span> = <span class="ruby-identifier">silent</span> +95: <span class="ruby-keyword kw">true</span> +96: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -688,22 +694,22 @@ <div class="method-source-code" id="disconnect-source"> <pre> - <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 96</span> - 96: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disconnect</span> - 97: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Restoring IO'</span>) - 98: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">silent</span> = <span class="ruby-keyword kw">true</span> - 99: <span class="ruby-identifier">$stdout</span> = <span class="ruby-ivar">@stdout</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@stdout</span> -100: <span class="ruby-identifier">$stderr</span> = <span class="ruby-ivar">@stderr</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@stderr</span> -101: <span class="ruby-identifier">$stdin</span> = <span class="ruby-ivar">@stdin</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@stdin</span> -102: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Standard IO has been restored'</span>) -103: <span class="ruby-comment cmt"># Release the client lock</span> -104: <span class="ruby-ivar">@clientConnection</span>.<span class="ruby-identifier">unlock</span> -105: <span class="ruby-keyword kw">true</span> -106: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 98</span> + 98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">disconnect</span> + 99: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Restoring IO'</span>) +100: <span class="ruby-constant">Log</span>.<span class="ruby-identifier">silent</span> = <span class="ruby-keyword kw">true</span> +101: <span class="ruby-identifier">$stdout</span> = <span class="ruby-ivar">@stdout</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@stdout</span> +102: <span class="ruby-identifier">$stderr</span> = <span class="ruby-ivar">@stderr</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@stderr</span> +103: <span class="ruby-identifier">$stdin</span> = <span class="ruby-ivar">@stdin</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@stdin</span> +104: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Standard IO has been restored'</span>) +105: <span class="ruby-comment cmt"># Release the client lock</span> +106: <span class="ruby-ivar">@clientConnection</span>.<span class="ruby-identifier">unlock</span> +107: <span class="ruby-keyword kw">true</span> +108: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -730,14 +736,14 @@ <div class="method-source-code" id="generate-uth-ey-source"> <pre> - <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 108</span> -108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateAuthKey</span> -109: <span class="ruby-identifier">rand</span>(<span class="ruby-value">1000000000</span>).<span class="ruby-identifier">to_s</span> -110: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 110</span> +110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generateAuthKey</span> +111: <span class="ruby-identifier">rand</span>(<span class="ruby-value">1000000000</span>).<span class="ruby-identifier">to_s</span> +112: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -764,28 +770,28 @@ <div class="method-source-code" id="init-ntercom-source"> <pre> - <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 55</span> -55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initIntercom</span> -56: <span class="ruby-comment cmt"># This is the authentication key that clients will need to provide to</span> -57: <span class="ruby-comment cmt"># execute DRb methods.</span> -58: <span class="ruby-ivar">@authKey</span> = <span class="ruby-identifier">generateAuthKey</span> -59: -60: <span class="ruby-ivar">@log</span> = <span class="ruby-constant">LogFile</span>.<span class="ruby-identifier">instance</span> -61: <span class="ruby-comment cmt"># This flag will be set to true by DRb method calls to terminate the</span> -62: <span class="ruby-comment cmt"># process.</span> -63: <span class="ruby-ivar">@terminate</span> = <span class="ruby-keyword kw">false</span> -64: -65: <span class="ruby-comment cmt"># This mutex is locked while a client is connected.</span> -66: <span class="ruby-ivar">@clientConnection</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span> -67: <span class="ruby-comment cmt"># This lock protects the @timerStart</span> -68: <span class="ruby-ivar">@timeLock</span> = <span class="ruby-constant">Monitor</span>.<span class="ruby-identifier">new</span> -69: <span class="ruby-comment cmt"># The time stamp of the last client interaction.</span> -70: <span class="ruby-ivar">@timerStart</span> = <span class="ruby-keyword kw">nil</span> -71: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 57</span> +57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initIntercom</span> +58: <span class="ruby-comment cmt"># This is the authentication key that clients will need to provide to</span> +59: <span class="ruby-comment cmt"># execute DRb methods.</span> +60: <span class="ruby-ivar">@authKey</span> = <span class="ruby-identifier">generateAuthKey</span> +61: +62: <span class="ruby-ivar">@log</span> = <span class="ruby-constant">LogFile</span>.<span class="ruby-identifier">instance</span> +63: <span class="ruby-comment cmt"># This flag will be set to true by DRb method calls to terminate the</span> +64: <span class="ruby-comment cmt"># process.</span> +65: <span class="ruby-ivar">@terminate</span> = <span class="ruby-keyword kw">false</span> +66: +67: <span class="ruby-comment cmt"># This mutex is locked while a client is connected.</span> +68: <span class="ruby-ivar">@clientConnection</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span> +69: <span class="ruby-comment cmt"># This lock protects the @timerStart</span> +70: <span class="ruby-ivar">@timeLock</span> = <span class="ruby-constant">Monitor</span>.<span class="ruby-identifier">new</span> +71: <span class="ruby-comment cmt"># The time stamp of the last client interaction.</span> +72: <span class="ruby-ivar">@timerStart</span> = <span class="ruby-keyword kw">nil</span> +73: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -815,17 +821,17 @@ <div class="method-source-code" id="restart-imer-source"> <pre> - <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 125</span> -125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restartTimer</span> -126: <span class="ruby-ivar">@timeLock</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span> -127: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Reseting client connection timer'</span>) -128: <span class="ruby-ivar">@timerStart</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span> -129: <span class="ruby-keyword kw">end</span> -130: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 127</span> +127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restartTimer</span> +128: <span class="ruby-ivar">@timeLock</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span> +129: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Reseting client connection timer'</span>) +130: <span class="ruby-ivar">@timerStart</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span> +131: <span class="ruby-keyword kw">end</span> +132: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -856,34 +862,34 @@ <div class="method-source-code" id="start-erminator-source"> <pre> - <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 146</span> -146: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">startTerminator</span> -147: <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> -148: <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span> -149: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@terminate</span> -150: <span class="ruby-comment cmt"># We wait for the client to propery disconnect. In case this does</span> -151: <span class="ruby-comment cmt"># not happen, we'll wait for the timeout and exit anyway.</span> -152: <span class="ruby-identifier">restartTimer</span> -153: <span class="ruby-keyword kw">while</span> <span class="ruby-ivar">@clientConnection</span>.<span class="ruby-identifier">locked?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">timerExpired?</span> <span class="ruby-keyword kw">do</span> -154: <span class="ruby-identifier">sleep</span> <span class="ruby-value">1</span> -155: <span class="ruby-keyword kw">end</span> -156: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">timerExpired?</span> -157: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">warning</span>(<span class="ruby-value str">'Shutting down DRb server due to timeout'</span>) -158: <span class="ruby-keyword kw">else</span> -159: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Shutting down DRb server'</span>) -160: <span class="ruby-keyword kw">end</span> -161: <span class="ruby-constant">DRb</span>.<span class="ruby-identifier">stop_service</span> -162: <span class="ruby-keyword kw">break</span> -163: <span class="ruby-keyword kw">else</span> -164: <span class="ruby-identifier">sleep</span> <span class="ruby-value">1</span> -165: <span class="ruby-keyword kw">end</span> -166: <span class="ruby-keyword kw">end</span> -167: <span class="ruby-keyword kw">end</span> -168: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 148</span> +148: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">startTerminator</span> +149: <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> +150: <span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span> +151: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@terminate</span> +152: <span class="ruby-comment cmt"># We wait for the client to propery disconnect. In case this does</span> +153: <span class="ruby-comment cmt"># not happen, we'll wait for the timeout and exit anyway.</span> +154: <span class="ruby-identifier">restartTimer</span> +155: <span class="ruby-keyword kw">while</span> <span class="ruby-ivar">@clientConnection</span>.<span class="ruby-identifier">locked?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">timerExpired?</span> <span class="ruby-keyword kw">do</span> +156: <span class="ruby-identifier">sleep</span> <span class="ruby-value">1</span> +157: <span class="ruby-keyword kw">end</span> +158: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">timerExpired?</span> +159: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">warning</span>(<span class="ruby-value str">'Shutting down DRb server due to timeout'</span>) +160: <span class="ruby-keyword kw">else</span> +161: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Shutting down DRb server'</span>) +162: <span class="ruby-keyword kw">end</span> +163: <span class="ruby-constant">DRb</span>.<span class="ruby-identifier">stop_service</span> +164: <span class="ruby-keyword kw">break</span> +165: <span class="ruby-keyword kw">else</span> +166: <span class="ruby-identifier">sleep</span> <span class="ruby-value">1</span> +167: <span class="ruby-keyword kw">end</span> +168: <span class="ruby-keyword kw">end</span> +169: <span class="ruby-keyword kw">end</span> +170: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -910,15 +916,15 @@ <div class="method-source-code" id="terminate-source"> <pre> - <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 73</span> -73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">terminate</span> -74: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Terminating on external request'</span>) -75: <span class="ruby-ivar">@terminate</span> = <span class="ruby-keyword kw">true</span> -76: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 75</span> +75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">terminate</span> +76: <span class="ruby-ivar">@log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">'Terminating on external request'</span>) +77: <span class="ruby-ivar">@terminate</span> = <span class="ruby-keyword kw">true</span> +78: <span class="ruby-keyword kw">end</span></pre> </div> </div> @@ -947,18 +953,18 @@ <div class="method-source-code" id="timer-xpired--source"> <pre> - <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 133</span> -133: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timerExpired?</span> -134: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">nil</span> -135: <span class="ruby-ivar">@timeLock</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span> -136: <span class="ruby-comment cmt"># We should see client interaction every 2 minutes.</span> -137: <span class="ruby-identifier">res</span> = (<span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span> <span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@timerStart</span> <span class="ruby-operator">+</span> <span class="ruby-value">2</span> * <span class="ruby-value">60</span>) -138: <span class="ruby-keyword kw">end</span> -139: <span class="ruby-identifier">res</span> -140: <span class="ruby-keyword kw">end</span></pre> + <span class="ruby-comment cmt"># File lib/daemon/ProcessIntercom.rb, line 135</span> +135: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timerExpired?</span> +136: <span class="ruby-identifier">res</span> = <span class="ruby-keyword kw">nil</span> +137: <span class="ruby-ivar">@timeLock</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span> +138: <span class="ruby-comment cmt"># We should see client interaction every 2 minutes.</span> +139: <span class="ruby-identifier">res</span> = (<span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span> <span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@timerStart</span> <span class="ruby-operator">+</span> <span class="ruby-value">2</span> * <span class="ruby-value">60</span>) +140: <span class="ruby-keyword kw">end</span> +141: <span class="ruby-identifier">res</span> +142: <span class="ruby-keyword kw">end</span></pre> </div> </div>