waiting time of shell()

2008-08-06 Thread [EMAIL PROTECTED]
Hello,

I use 

put shell(perlupload) into result
if result contains xyz then 
put true into itworked  
else
...
end if

with perlupload as a perl program which loads files  through proxy http on slow 
connections to a cgi prog on the server ... and gets the http-HTML-respond page 
as result. This result is returned to runrev and I want to check the success.

This works fine for 90 % of the files but in the case the files have the size 
of up to 5 MB the perl upload process needs more time than the shell command is 
patient to wait. The perl process in most cases continues until success, but 
the return of the shell is empty and therefore my runrev prog never could be 
sure whether the upload process had been successful or not. I cannot do the 
upload in runrev native, because it is a special VPN context, which I could not 
solve in runrev native but in perl.

Q1: what is the prefigured waiting time of a shell command in runrev?
Q2: can I change this waiting time (let shell the time to work longer for long 
processes, before it returns control to runrev and says empty as result)


Thank you for any advice,

Franz

Mit freundlichen Grüßen
Franz Böhmisch

[EMAIL PROTECTED]
http://www.animabit.de
GF Animabit Multimedia Software GmbH
Am Sonnenhang 22
D-94136 Thyrnau
Tel +49 (0)8501-8538
Fax +49 (0)8501-8537
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: waiting time of shell()

2008-08-06 Thread Mark Smith

Perhaps you could try using open process, something like:


open process perlupload for read
repeat
  wait 500 millisecs with messages
  read from process perlupload until empty
  put it into tResponse
  if xyz is in it then
put it into tResponse
exit repeat
  end if
end repeat

close process perlupload
put tResponse

You might want to put in some other exit conditions to avoid the loop  
being infinite, but this sort of approach might work better for long  
uploads.


Best,

Mark

On 6 Aug 2008, at 09:59, [EMAIL PROTECTED] wrote:


Hello,

I use

put shell(perlupload) into result
if result contains xyz then
put true into itworked
else
...
end if

with perlupload as a perl program which loads files  through proxy  
http on slow connections to a cgi prog on the server ... and gets  
the http-HTML-respond page as result. This result is returned to  
runrev and I want to check the success.


This works fine for 90 % of the files but in the case the files  
have the size of up to 5 MB the perl upload process needs more time  
than the shell command is patient to wait. The perl process in most  
cases continues until success, but the return of the shell is empty  
and therefore my runrev prog never could be sure whether the upload  
process had been successful or not. I cannot do the upload in  
runrev native, because it is a special VPN context, which I could  
not solve in runrev native but in perl.


Q1: what is the prefigured waiting time of a shell command in runrev?
Q2: can I change this waiting time (let shell the time to work  
longer for long processes, before it returns control to runrev and  
says empty as result)



Thank you for any advice,

Franz

Mit freundlichen Grüßen
Franz Böhmisch

[EMAIL PROTECTED]
http://www.animabit.de
GF Animabit Multimedia Software GmbH
Am Sonnenhang 22
D-94136 Thyrnau
Tel +49 (0)8501-8538
Fax +49 (0)8501-8537
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re-2: waiting time of shell() + open process + proxy authentication in runrev

2008-08-06 Thread [EMAIL PROTECTED]
Mark S   Mark Sch

Thank you.
I got this advice using open process almost simultaneousely from the both 
Marks. 
Mark Schonewille added I should implement in runrev the protocol with an 
authenticated proxy instead of using shell - I tried but only had success in 
perl.

I wrote this perl script, put it into a custom prop and replaced the $variables 
with the runrev variables with the same name before running it with perl -e.
use strict; use LWP::UserAgent; use HTTP::Request::Common; my $ua = 
LWP::UserAgent-new; $ua-proxy(['http', 'ftp'], 'http://$proxyusername:[EMAIL 
PROTECTED]:8080/'); $ua-timeout(30);$ua-agent(Mozilla/4.0 (compatible; MSIE 
6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)); $ua-agent(Mozilla/4.0 
(compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)); my $req = 
POST 'http://$servername/admin/aniupload.cgi', Content_Type = 
'multipart/form-data', Content = [ pdftitel = '$dateiname', 
verzeichnis='$verzeichnis', filename = ['$quelldatei'] ]; 
$req-authorization_basic('$username', '$passwort'); $req-header('Accept' = 
'text/plain'); my $response = $ua-request($req); if ($response-is_success) { 
print $response-content; } else { die $response-status_line; } 
I had successfully implemented all in runrev but not the line

$ua-proxy(['http', 'ftp'], 'http://$proxyusername:[EMAIL PROTECTED]:8080/');

http://mail.runrev.com/pipermail/use-revolution/2008-April/109930.html (Answers 
to http://mail.runrev.com/pipermail/use-revolution/2008-April/109876.html)
did not work for me.

Regards, Franz
Mit freundlichen Grüßen
Franz Böhmisch

[EMAIL PROTECTED]
http://www.animabit.de
GF Animabit Multimedia Software GmbH
Am Sonnenhang 22
D-94136 Thyrnau
Tel +49 (0)8501-8538
Fax +49 (0)8501-8537


Original Messageprocessed by David InfoCenter 
Subject: Re: waiting time of shell() (06-Aug-2008 11:12)
From:Mark Smith [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]


Perhaps you could try using , something like:


open process perlupload for read
repeat
wait 500 millisecs with messages
read from process perlupload until empty
put it into tResponse
if xyz is in it then
put it into tResponse
exit repeat
end if
end repeat

close process perlupload
put tResponse
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution