Re: How to handle long responses with direct action?
Re: How to handle long responses with direct action?
- Subject: Re: How to handle long responses with direct action?
- From: Amiel Montecillo <email@hidden>
- Date: Sat, 10 Apr 2010 09:20:23 +0800
I think I will have to play around a bit more with the 2 options. The requirement is rather picky about needless sessions.
Anyways, I want to thank you for all the input, I think I will be able to stay human now.
Cheers!
Amiel
On Fri, Apr 9, 2010 at 8:46 PM, Kieran Kelleher
<email@hidden> wrote:
If you have multiple instances, you will need to represent the task and its current status as an Entity in the database since direct actions can go to any instance. The task would need to update the status in the database periodically so that any instance can check the current status. Temporarily using a session for the duration of the long task will alleviate the need to do this.
On Apr 9, 2010, at 8:40 AM, Lachlan Deck wrote:
> On 09/04/2010, at 6:54 PM, Amiel Montecillo wrote:
>
>> I have a direct action method that performs a rather lengthy process. I
>> looked at WOLongResponsePage but it seems that it creates a session.
>
> Is the lengthy process handled via a separate thread?
>
> Assuming it is, you've got two options:
> - use WOLongResponsePage and terminate the session when done.
> - simulate WOLongResponsePage by using WORedirect to refresh the direct action (perhaps increment some query param or cookie value) until the task is done. You'd need to register the thread with the app with some unique key that's stored in a cookie or something.
>
>> Is there a way to handle a long running process on a direct action without
>> creating any session?
>
> with regards,
> --
>
> Lachlan Deck
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
--
socket error: unable to connect to 127.0.0.1
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden