[owncloud-devel] AJAX call every n seconds

Sean Bowen-Williams seanbowenwilliams2015 at u.northwestern.edu
Mon Sep 22 15:50:40 GMT 2014


The AJAX call that should retrieve the updated percentage complete is
triggered once at the beginning of the conversion, and then times out until
the conversion is complete.
And yes, I'm on OC 7.

Thanks,
Sean

On Mon, Sep 22, 2014 at 4:21 AM, Vincent Petry <pvince81 at owncloud.com>
wrote:

>  Hello Sean,
>
> Are you saying that the second ajax call is blocking (pending) until the
> video is completely converted ?
> It could be related to the session access that might be locked during the
> second call.
> Are you using OC 7 ?
>
> Another alternative would be to use an EventSource (you can search the
> code for examples), but I don't know whether it can survive PHP timeouts.
>
> Cheers,
>
> Vincent
>
>
> On 09/20/2014 08:54 PM, Sean Bowen-Williams wrote:
>
> Hey guys,
> I'm trying to write a progress bar for a video conversion going on in the
> background. I analyze the log file with PHP to determine the percentage
> complete, then echo the variable to be picked up with AJAX to my Javascript
> file.
>
> I used setTimeout to run the AJAX request every 2 seconds, but it only
> successfully complete twice: once at the very beginning, and again once the
> conversion is complete. So effectively, my progress bar tells me 0% and
> 100%. Very helpful, I know.
>
> I use a different AJAX call to pass file information about the video to be
> converted to a different PHP file.
>
> Is this an issue of simply to many simultaneous AJAX calls? Any advice
> would be appreciated.
>
> -Sean
>
>
>
>
> _______________________________________________
> Devel mailing listDevel at owncloud.orghttp://mailman.owncloud.org/mailman/listinfo/devel
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at owncloud.org
> http://mailman.owncloud.org/mailman/listinfo/devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20140922/ba0994c5/attachment.html>


More information about the Devel mailing list