On 18/07/2012 19:58, Casey Deccio wrote: Hi Casey,
> One naive way to do it is to serialize and deserialize, something like: > > # z1 is an existing zone object... > > import StringIO > > str_io = StringIO.StringIO() > z1.to_file(str_io) > z2 = dns.zone.from_text(str_io. > getvalue()) > > Alternatively, you could use a mutex shared between the AXFR and update > processes. The update process would queue updates as they come in, if the > mutex is unavailable, instead of immediately making the changes. Thanks for these suggestions. I tried the serialise/deserialise method, and it works, but I have to pause updates while writing the zone into a file. It takes several seconds to do this for a large zone. So I went for the mutex approach. In most practical cases, the sequence will be update, _then_ AXFR, so it's okay to lock the zone while doing the AXFR. Regards, Anand _______________________________________________ dnspython-users mailing list [email protected] http://howl.play-bow.org/mailman/listinfo/dnspython-users
