Re: GenericAjaxLongResponsePage ERXTaskPercentComplete and ERXTaskStatus
Re: GenericAjaxLongResponsePage ERXTaskPercentComplete and ERXTaskStatus
- Subject: Re: GenericAjaxLongResponsePage ERXTaskPercentComplete and ERXTaskStatus
- From: Louis Demers <email@hidden>
- Date: Fri, 01 Oct 2010 17:22:17 -0400
On 2010-10-01, at 15:01 , Kieran Kelleher wrote:
> Hi Louis,
>
> Sorry, I haven't had a chance to commit all of this functionality to Wonder yet ....... it had some dependencies with respect to error handling that I wanted to deal with without unnecessarily bringing in my whole error handling classes ...... and I have just been so busy (aka very long hours) with commitments at my job recently, I haven't had a chance .... will try to get it wrapped up next week in my spare time.
Hey, I understand and greatly appreciatethe contributio nalread made. It's helping me cleanup many of my long tasks.
> That "beta" demo repository for JR example and friends is not the same as final Wonder release, just demo unsupported stuff. The final Wonder committed variant will be maintained and bug-fixed when needed.
No problem, I'm not concerned if names are changed or the api is adjusted, I'll refactor or clena up once the official release is done.
>
> Meanwhile, off the top of my head..........
>
> 1) In that GenericALR page, there is a conditional future.hasStatus that determines if status is displayed, which in turn calls ERXFutureTask.hasStatus which simply checks lazily if the task implements the interface ERXTaskStatus. That is checked once and cached. So add some logging there or a breakpoint to see what is going on. Also log the status on your task's status() method implementation to see the value and to ensure it is being called.
>
> 2) Task percent complete is simply a double value returned by your class' percentComplete() method. It is up to you to return the correct value, so log your calculations from your method to understand why you are returning more than 100.0.
I'll checked that. But you confirm that if my percentComplete() method returns smaller values, the progress bar will be able to regress 8-) 8-)
>
> When I have multiple phases in a background task, I split the 100% so that my total is 100%. Let's say I arbitrarily allocate 30% to phase 1 and 70% to phase 2, then my total percentage calc would be
>
> percentComplete = (completedCountPhase1 / totalPhase1) * 30.0 + (completedCountPhase2 / totalPhase2) * 70.0
>
> -Kieran
>
>
> On Oct 1, 2010, at 11:52 AM, Louis Demers wrote:
>
>> Hi,
>>
>> Integrated the GenericAjaxLongResponsePage from the WOWODC2010 repository into my stuff and I love it. I'd like some clarification on 2 issues
>>
>> Background: My long task has to be performed in 2 phases, Phase one goes through a large array and reduces in into a smaller array that is feed to phase 2 for long calculation.
>>
>> I expected that I could set the percentComplete based upon the number of array in phase one. Then, during phase 2 the percentComplete would be based upon the count of the second array. That would case the progress bar to go form 0% to 100 % to 0% to 100%. I would be using the ERXTaskStatus to provide feedback on the phase being processed
>>
>> 1) implementing ERXTaskStatus has no effect, the string does not appear on the progress page.
>>
>> 2) the percentage indicator and progress bar goes from 0% to 200%
>>
>> Is this a bug , normal, or am I doing it wrong ?
>>
>> Thanks
>>
>>
>>
>> Louis Demers eng.
>> www.obzerv.com
>>
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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
Louis Demers eng.
www.obzerv.com
_______________________________________________
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