ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Rice <rob...@windermere.com>
Subject Re: <timer /> task created
Date Thu, 19 Feb 2004 16:07:11 GMT
Thanks for the pointer to the "limit" task.  I assumed that what I was 
doing was not terribly unique.  In fact, I utilize the ant-contrib tasks.  
But, I have an older version lacking the "limit" task.

I took a look at the documentation.  Seems "limit" does basically the same 
thing and for the same reason ( hung socket connections to name one reason 
).  

The one feature that I see in the "timer" but not in "limit" is the 
ability to set a timeoutproperty if the timer pops.  The failonerror 
attribute of the "limit" task allows one to fail or not at timeout.  A 
timeoutproperty gives knowledge of the timeout, without immediately 
failing.  The user may want to take some action ( process the files that 
were collected, cleanup... ) and then fail ( or not ) if the contained 
tasks were not completed.

What would be the best way to contribute, or make suggestions, to the 
ant-contrib project?

Thanks,
Robert Rice

On Wed, 18 Feb 2004, Dale Anson wrote:

> 
> Robert,
> 
> 
> A similar task exists in Ant-Contrib, the "limit" task. Maybe you can 
> see if there are features your task has that the "limit" task doesn't 
> have, and the two can be combined?
> 
> 
> The on-line ant-contrib documentation is not up to date, but you can see 
> reasonably current docs for "limit" at 
> http://antelope.smartpennies.com/manual/bk03ch10.html.
> 
> 
> Dale
> 
> 
> 
> 
> Robert Rice wrote:
> 
> 
> > I recently created a <timer /> task, for limiting the execution time of a

> > series of nested tasks.   
> > 
> > Why did I create such a thing?  In my case, I 
> > utilize ant to perform a number of lengthy ftp and http get's against a 
> > long list of files.  At times, these processes will "hang".  In other 
> > words, not complete in a timely fashion and not fail.  I wanted to be able 
> > to limit this behavior.
> > 
> > I thought I would ping this list to see if such a task is useful to other 
> > users, possibly ( hopefully ) for completely different reasons.  If it 
> > proves useful, how do I contribute this new ( non patch ) code?  Further 
> > class details are included below.
> > 
> > Thanks
> > Robert Rice
> > 
> > Here are more specifics about the <timer /> class:
> > 
> > This class is designed to limit the maximum execution time for a series of 
> > tasks. This limit is the total time allowed for all contained tasks.
> > 
> > The following exit strategies are provided by the timer task:
> > 
> >     * If the time limit is reached, the current task will be interrupted 
> > and no more contained tasks will be executed.
> >     * If a BuildException is thrown by the current task, no more contained 
> > tasks will be executed.
> >     * The timer task will exit normally if all contained tasks complete 
> > execution prior to the maximum time limit.
> > 
> > This class utilizes the Unit EnumeratedAttribute of the <waitfor /> task.

> > This was 
> > done to share a bit of the timer functionality plus adhere to its 
> > attribute naming conventions. In a way, this class is somewhat of a 
> > combination of the <waitfor /> task and the <sequential />task. This
task 
> > can be used in conjunction 
> > with <parallel /> and <sequential /> tasks.
> > 
> > The following attributes can be specified on a timer task:
> > 
> >     * maxwait - maximum length of time to wait before giving up
> >     * maxwaitunit - The unit to be used to interpret maxwait attribute
> >     * timeoutproperty - name of a property to set if maxwait has been 
> > exceeded.
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message