Hi, Christian!
The async execution stops the processing, unless there is an internal
error. Considering your question, here are a few scenarios and execution
stacks:
Scenario 1: The async query completes successfully:
route(0) -> async(avp_db_query) -> route(resume_some_blah); # xlog bla
is not printed
Secnario 2: The async succeeds, but nothing was found
route(0) -> async(avp_db_query) -> route(resume_some_blah); # xlog bla
is not printed and the returned code is -2
Scenario 3: Something goes wrong and avp_db_query does not manage to
launch async query
route(0) -> async(avp_db_query) fails -> xlog("xlog bla"); # xlog is
printed and avp_db_query() is not even executed
So unless there is something really bad going on, and the async query
does not get to be run, you will never see the "xlog bla". Hope that was
clear.
Best regards,
Răzvan
On 02/27/2016 01:15 PM, Christian Lahme wrote:
Hi everybody,
I understood, that
route {
async(avp_db_query("select some_bla from some_table where somevar =
'somekey';", $avp(some_bla)), resume_some_blah);
xlog("xlog bla");
}
route[resume_some_blah] {
# do something
}
wan’t call the xlog in first route.
But what about
route {
route(some_blah);
xlog("xlog bla");
}
route[some_blah] {
async(avp_db_query("select some_bla from some_table where somevar =
'somekey';", $avp(some_bla)), resume_some_blah);
}
route[resume_some_blah] {
# do something
}
Will xlog be called?
Best regards
Chris
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users