Coypu retry logic

45 views
Skip to first unread message

Ryan Cosans

unread,
Nov 17, 2014, 6:52:41 AM11/17/14
to co...@googlegroups.com
Hi,

I was wondering if anyone knows how the retry logic in coypu works and if it is possible to use certain features of coypu in isolation?

Any help would be awesome.

Adrian Longley

unread,
Nov 17, 2014, 8:42:51 AM11/17/14
to co...@googlegroups.com
On Mon, Nov 17, 2014 at 11:52 AM, Ryan Cosans <ryanm...@gmail.com> wrote:
Hi,

I was wondering if anyone knows how the retry logic in coypu works

yep
 
and if it is possible to use certain features of coypu in isolation?

maybe, what exactly are you looking for?
 
Any help would be awesome.

--
You received this message because you are subscribed to the Google Groups "Coypu" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coypu+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryan Cosans

unread,
Nov 17, 2014, 10:09:51 AM11/17/14
to co...@googlegroups.com
I would like the ability to control coypu slightly more in particular the retry logic that handles waiting for a page to fully load since currently I am using polling that can cause false negatives (shown below).

while (true)
{
if (stopwatch.Elapsed.Seconds > 40) throw new Exception("Timeout wait for async commands to complete.");

var ajaxIsComplete = false;
try
{
if (js != null) ajaxIsComplete = (bool)js.ExecuteScript("return (window.gaGlobal !== null);");
}
catch (UnhandledAlertException)
{
ajaxIsComplete = true;
}
catch (InvalidOperationException)
{
}

if (ajaxIsComplete)
{
break;
}
}

Adrian Longley

unread,
Nov 17, 2014, 12:49:32 PM11/17/14
to co...@googlegroups.com
On Mon, Nov 17, 2014 at 3:09 PM, Ryan Cosans <ryanm...@gmail.com> wrote:
I would like the ability to control coypu slightly more in particular the retry logic that handles waiting for a page to fully load since currently I am using polling that can cause false negatives (shown below).

while (true)
{
if (stopwatch.Elapsed.Seconds > 40) throw new Exception("Timeout wait for async commands to complete.");

var ajaxIsComplete = false;
try
{
if (js != null) ajaxIsComplete = (bool)js.ExecuteScript("return (window.gaGlobal !== null);");
}
catch (UnhandledAlertException)
{
ajaxIsComplete = true;
}
catch (InvalidOperationException)
{
}

if (ajaxIsComplete)
{
break;
}
}



Sorry, I still don't really understand what you need, can you explain further?
Reply all
Reply to author
Forward
0 new messages