[ovs-dev] [idl 1/4] ovs-monitor-ipsec: Use same pattern as ovs-xapi-sync.

Ethan Jackson ethan at nicira.com
Wed Apr 4 20:47:58 UTC 2012


> +    seqno = idl.change_seqno    # Sequence number when we last processed the db

Does it make sense to initialize seqno to None so we're guaranteed to
run through the database initially? Looking at ovs-xapi-sync it uses
this same model, so I suspect it's fine.  Just a thought, feel free to
ignore.

Looks good,

Ethan




>     while True:
>         unixctl_server.run()
>         if exiting:
>             break
>
> -        if not idl.run():
> +        idl.run()
> +        if seqno == idl.change_seqno:
>             poller = ovs.poller.Poller()
>             unixctl_server.wait(poller)
>             idl.wait(poller)
>             poller.block()
>             continue
> +        seqno = idl.change_seqno
>
>         ssl_cert = get_ssl_cert(idl.tables)
>
> --
> 1.7.2.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list