[Serusers] serial forking with a recursive failure_route block

Michael Przybylski mikep at host.gimmethebrain.net
Wed Jul 14 03:55:20 CEST 2004


On Wed, 14 Jul 2004, Jiri Kuthan wrote:

> I did not think so much about watching URIs, rather just keeping some
> internal status associated with transaction in progress.

Is using search() a viable option?

If so, I can figure out what I'm looking for by using ngrep, but if you
already happen to know what I can feed to search() that'd save me a bit of
time.

> A possibility would be to cascade through failure_routes:
>
> failure_route[1] {
>   t_on_failure(2); # if this fails, try 2
>   ...
> }
>
> failure_route[2] {
>   t_on_failure(3); # if this fails, try 3
>   ...
> }
>
> etc.

Since there is only a limited number of failure routes, I'd rather not do
it that way.

>
> Other possibilty I thought of would be
>
> route[1] {
>  ...
>  setflag(1); # state == 1
>  t_relay();
>  ...
>
> failure_route[1] {
>
>   if (isflagset(1)) {
>        # try 2
>        resetflag(1); setflag(2);
>        break;
>   };
>     if (isflagset(2)) {
>        # try 3
>        resetflag(2); setflag(3);
>        break;
>   };
> ...

This has some potential too.  What is the allowable range of flag values?

Best regards,
Mike Przybylski




More information about the sr-users mailing list