[wpkg-users] Global max execution time hardcoded?

Marco Gaiarin gaio at sv.lnf.it
Fri Mar 22 14:30:41 CET 2013


Mandi! Rainer Meier
  In chel di` si favelave...

> As you already found out all executions of external applications are
> done via the exec() function.

I initially supposed there's was a ''master'', ''global'' timeout, but
clearly wpkg.js it is not the best place to something like that...
better to look at the ''agent''... sorry for the misunderstaning.


> If you like to change the timeout then
> feel free to adjust it, it's open source. I currently don't see a
> reason to configure it globally as you can also set individual
> execution times on individual commands and nothing else you will
> change if you change the exec() function.

Sorry Rainer, but... why?!
Why keep an hardcoded value, when with a very little effort and no code
''disruption'' (it is only a default variable assignment!!!) we can make
this customizable?


> If you know that a specific command is taking much less time you can
> also lower the timeout but it will have an impact only if this
> command will exceed the timeout. WPKG of course does not wait until
> timeout expires if the command terminates earlier.

It is true also the converse: i can setup a very low default timeout
value, and set it high for commands that i know i take more.



Attached two little patch:

1) the first, i think fix a bug, because now there's two hardcoded
 value for timeout, one for actions, one for checks.

2) the second add the option /execTimeout; i've simply mimic the
 /logLevel parameter, i've not tested the patch and i really not
understood how are handled the options in config.xml, so i've not
verified if my patches suffices to handle also the definition of:

	<param name='execTimeout' value='600' />

in config.xml. Indeed, i've to do other thing now, so all my patches
are untested. ;)


Please, give some feedback, and i'll do some test, putting patches on
BTS. Thanks.

-- 
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                    http://www.sv.lnf.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
	   http://www.lanostrafamiglia.it/chi_siamo/5xmille.php
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wpkg.js.nohardcodedtimeoutonexecutecheck.diff
Type: text/x-diff
Size: 369 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20130322/8004d00f/attachment-0006.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wpkg.js.paramexectimeoutadded.diff
Type: text/x-diff
Size: 2071 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20130322/8004d00f/attachment-0007.diff>


More information about the wpkg-users mailing list