Hello to all
I use STAF / STAX to automate some tasks.
I developed a python class that allows me to set the stdout of each process
node in XML.
the problem that it works well, except when stdout is large (7 mega
octects).
java.exe consumes 99.9% of my CPU, and I see no error in the logs (and staf
jvm).
----------------
<script>
proc = Process(procName)
</script>
...
<process name="'copygrep'">
<location>location</location>
<command mode="'shell'">'%s/copygrep.sh'%(dir)</command>
<parms>'%s'%(params)</parms>
<console use="'same'"/>
<stderr mode="'stdout'"/>
<returnstdout/>
</process>
<script>
proc._end([RC,STAXResult[0][1]])
</script>
...
-----------------------------------------------------
<script>
class Process:
def __init__(self,name):
self.name = name
self.stdout = 'NaN'
self.rc ='-1'
...
def _end(self,resultTab):
if resultTab[0] != '' :
self.rc = str(resultTab[0])
if resultTab[1] != '' :
import re
self.stdout = resultTab[1]
...
def getXMLResult(self):
from xml.dom.minidom import Document
xmlDoc = Document()
...
stdout = xmlDoc.createElement("stdout")
stdout.appendChild(xmlDoc.createTextNode(self.stdout))
process.appendChild(stdout)
...
</script>
it is an overflow , a bug or something else ?
any ideas ?
Anas A.
Thanks,
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users