Calling System>>performOnServer: from Seaside

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Calling System>>performOnServer: from Seaside

Carla F. Griggio
Hi everybody!
I have a Seaside callback that executes System>>performOnServer:'aTopazScript.sh'. It works perfect, but... the Seaside request will last the same time that the topaz script takes to run, and that's usually about 5 minutes. That causes the famous error "Too many retries: 11" if the user clicks somewhere else (and nowadays asking someone not to click anywhere during 5 minutes sounds crazy, hehehe).

I tried to do a fork with the intention that the Seaside request could return to the user while the topaz script keeps runing, like this:

[System performOnServer: 'aTopazScript.sh'] fork

but I had no luck.

¿Any ideas on how can I get the topaz script running independently from the seaside request that started it?

Thanks!!
Carla.


Reply | Threaded
Open this post in threaded view
|

Re: Calling System>>performOnServer: from Seaside

Paul DeBruicker
See the Service VM example here:

http://code.google.com/p/glassdb/wiki/ServiceVMExample

there is also a thread from the GLASS mailing list last fall where
Nick Ager adapts that example to use futures but I can't google it now
for some reason....




On Fri, Apr 1, 2011 at 2:04 PM, Carla F. Griggio
<[hidden email]> wrote:

> Hi everybody!
> I have a Seaside callback that executes
> System>>performOnServer:'aTopazScript.sh'. It works perfect, but... the
> Seaside request will last the same time that the topaz script takes to run,
> and that's usually about 5 minutes. That causes the famous error "Too many
> retries: 11" if the user clicks somewhere else (and nowadays asking someone
> not to click anywhere during 5 minutes sounds crazy, hehehe).
>
> I tried to do a fork with the intention that the Seaside request could
> return to the user while the topaz script keeps runing, like this:
>
> [System performOnServer: 'aTopazScript.sh'] fork
>
> but I had no luck.
>
> ¿Any ideas on how can I get the topaz script running independently from the
> seaside request that started it?
>
> Thanks!!
> Carla.
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Calling System>>performOnServer: from Seaside

Gerhard Obermann
You could use:

System performOnServer: 'topaz.sh &'

Gerhard

On Fri, Apr 1, 2011 at 8:13 PM, Paul DeBruicker <[hidden email]> wrote:
See the Service VM example here:

http://code.google.com/p/glassdb/wiki/ServiceVMExample

there is also a thread from the GLASS mailing list last fall where
Nick Ager adapts that example to use futures but I can't google it now
for some reason....




On Fri, Apr 1, 2011 at 2:04 PM, Carla F. Griggio
<[hidden email]> wrote:
> Hi everybody!
> I have a Seaside callback that executes
> System>>performOnServer:'aTopazScript.sh'. It works perfect, but... the
> Seaside request will last the same time that the topaz script takes to run,
> and that's usually about 5 minutes. That causes the famous error "Too many
> retries: 11" if the user clicks somewhere else (and nowadays asking someone
> not to click anywhere during 5 minutes sounds crazy, hehehe).
>
> I tried to do a fork with the intention that the Seaside request could
> return to the user while the topaz script keeps runing, like this:
>
> [System performOnServer: 'aTopazScript.sh'] fork
>
> but I had no luck.
>
> ¿Any ideas on how can I get the topaz script running independently from the
> seaside request that started it?
>
> Thanks!!
> Carla.
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Calling System>>performOnServer: from Seaside

Carla F. Griggio
Paul, I had read before that thread and it seemed interesting, but it looked a little more complex that what I needed to do. I was hoping to find some other workaround... :P

... and what Gerard suggested works perfect.

Thank you, guys :D

On Fri, Apr 1, 2011 at 4:13 PM, Gerhard Obermann <[hidden email]> wrote:
You could use:

System performOnServer: 'topaz.sh &'

Gerhard


On Fri, Apr 1, 2011 at 8:13 PM, Paul DeBruicker <[hidden email]> wrote:
See the Service VM example here:

http://code.google.com/p/glassdb/wiki/ServiceVMExample

there is also a thread from the GLASS mailing list last fall where
Nick Ager adapts that example to use futures but I can't google it now
for some reason....




On Fri, Apr 1, 2011 at 2:04 PM, Carla F. Griggio
<[hidden email]> wrote:
> Hi everybody!
> I have a Seaside callback that executes
> System>>performOnServer:'aTopazScript.sh'. It works perfect, but... the
> Seaside request will last the same time that the topaz script takes to run,
> and that's usually about 5 minutes. That causes the famous error "Too many
> retries: 11" if the user clicks somewhere else (and nowadays asking someone
> not to click anywhere during 5 minutes sounds crazy, hehehe).
>
> I tried to do a fork with the intention that the Seaside request could
> return to the user while the topaz script keeps runing, like this:
>
> [System performOnServer: 'aTopazScript.sh'] fork
>
> but I had no luck.
>
> ¿Any ideas on how can I get the topaz script running independently from the
> seaside request that started it?
>
> Thanks!!
> Carla.
>
>
>