Async tag sanity check

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Async tag sanity check

Steve Upton

I have a tag that runs fine synchronously. I think I'm handing it all the parameters it needs to run async but it does call some fairly complicated tags in order to run reports, etc.

The problem is that as soon as I run it -async it just disappears. My calling tag runs merrily along as it should but I can't see the async tag in Lasso's thread list and it really should be in there, the tag takes a long time to run when it's not async.

none of the feedback that I have logging shows up either. I have a logging entry at the beginning of the async tag and... nothing...

is there a way to trouble-shoot this stuff that I'm missing?

regards,

Steve



--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Async tag sanity check

Daniel Logue
You can send yourself an email at different points in the tag to
pinpoint where its failing...

-----Original Message-----
From: Lasso Talk [mailto:[hidden email]] On Behalf Of Steve
Upton
Sent: Friday, January 23, 2009 8:26 AM
To: Lasso Talk
Subject: Async tag sanity check


I have a tag that runs fine synchronously. I think I'm handing it all
the parameters it needs to run async but it does call some fairly
complicated tags in order to run reports, etc.

The problem is that as soon as I run it -async it just disappears. My
calling tag runs merrily along as it should but I can't see the async
tag in Lasso's thread list and it really should be in there, the tag
takes a long time to run when it's not async.

none of the feedback that I have logging shows up either. I have a
logging entry at the beginning of the async tag and... nothing...

is there a way to trouble-shoot this stuff that I'm missing?

regards,

Steve



--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Async tag sanity check

Steve Upton
At 8:40 AM -0800 1/23/09, Daniel Logue wrote:
>You can send yourself an email at different points in the tag to
>pinpoint where its failing...

well... I haven't tried emailing but if logging to a txt file fails then I don't think emailing is going to work...

Steve



--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Async tag sanity check

Bil Corry-3
Steve Upton wrote on 1/23/2009 11:27 AM:
> well... I haven't tried emailing but if logging to a txt file fails then I don't think emailing is going to work...

If you're logging to a text file using relative web paths, then it will fail as you have to use absolute paths from the hard disk root.  What I do is run Lasso in console mode on my dev box, and use [log_critical('got here!')] sprinkled throughout the code.  Then I can see those messages displayed in the console.


- Bil


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Async tag sanity check

Daniel Logue
One of the other "gotchas" to watch out for when converting a tag to an
asynchronous version is that if you reference any page or global
variables, or any session variables, it will also fail.

Asynchronous tags/processes only know what you tell them - meaning that
they only know the local variables that you passed in to them.  They
aren't aware of the scope they're being triggered from, and don't have
access to the variables from that scope either.

-----Original Message-----
From: Lasso Talk [mailto:[hidden email]] On Behalf Of Bil
Corry
Sent: Friday, January 23, 2009 9:31 AM
To: Lasso Talk
Subject: Re: Async tag sanity check

Steve Upton wrote on 1/23/2009 11:27 AM:
> well... I haven't tried emailing but if logging to a txt file fails
then I don't think emailing is going to work...

If you're logging to a text file using relative web paths, then it will
fail as you have to use absolute paths from the hard disk root.  What I
do is run Lasso in console mode on my dev box, and use
[log_critical('got here!')] sprinkled throughout the code.  Then I can
see those messages displayed in the console.


- Bil


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Async tag sanity check

Steve Upton
At 11:06 AM -0800 1/23/09, Daniel Logue wrote:
>One of the other "gotchas" to watch out for when converting a tag to an
>asynchronous version is that if you reference any page or global
>variables, or any session variables, it will also fail.
>
>Asynchronous tags/processes only know what you tell them - meaning that
>they only know the local variables that you passed in to them.  They
>aren't aware of the scope they're being triggered from, and don't have
>access to the variables from that scope either.

yeah, I'm cool with that. This is a fairly complicated piece of code so I'm not sure if I'm violating that or not.

What I was hoping for was some error reporting or some other type of feedback.

I am going to try to get log_critical to work (thanks Bil). Strangely, I can see the log entries in Lasso's site admin tool even though I'm not running Lasso in console mode?

So, I'll try to get stuff out of log_critical in the async tag to see where the failure may be occurring.

thanks,

Steve



--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Async tag sanity check

Bil Corry-3
In reply to this post by Daniel Logue
Daniel Logue wrote on 1/23/2009 1:06 PM:
> One of the other "gotchas" to watch out for when converting a tag to an
> asynchronous version is that if you reference any page or global
> variables, or any session variables, it will also fail.

That's why I use this template for spawning async threads, it'll copy all the vars on the current page into the async thread, making them available to the async thread:

        http://www.lassotech.com/async


- Bil


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Async tag sanity check

Johan Solve
In reply to this post by Steve Upton
On Fri, Jan 23, 2009 at 6:27 PM, Steve Upton <[hidden email]> wrote:
> At 8:40 AM -0800 1/23/09, Daniel Logue wrote:
>>You can send yourself an email at different points in the tag to
>>pinpoint where its failing...
>
> well... I haven't tried emailing but if logging to a txt file fails then I don't think emailing is going to work...

I like to log async processes to a global variable.

// initialize the global
!(global('async_log') -> isa('array')) ? global('async_log'=array);

// add a log entry to the global
$async_log -> insert('I'm here!');

// output the log as html on another page
$async_log -> join('<br>');




>
> Steve
>
>
>
> --
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>



--
Mvh
Johan Sölve
____________________________________
Montania System AB
Halmstad   Stockholm   Malmö
http://www.montania.se

Johan Sölve
Mobil +46 709-51 55 70
[hidden email]

Kristinebergsvägen 17, S-302 41 Halmstad, Sweden
Telefon +46 35-136800 |  Fax +46 35-136801

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/