[PDB-tech] peeringdb-py feedback

Chris Caputo ccaputo at alt.net
Mon Mar 21 20:06:44 PDT 2016


On Mon, 21 Mar 2016, Matt Griswold wrote:
> Sorry for the delay, I've been focusing on the PDB 2.0 release.

No sorries!  You're rockin'.

> * Chris Caputo <ccaputo at alt.net> [160316 09:55 +0000]:
> > Some feedback to the creators of peeringdb-py:
>
> Thanks, could you make issues at
> https://github.com/peeringdb/peeringdb-py for those? 1 and 2 I
> completely agree with, 3 is fine but I'm really not too worried about
> it - I'd accept a pull request tho :)

Issues made and pull request submitted.

Thanks,
Chris

> > 1)
> > The "updated" field in the local database, for each table, appears to
> > be based on when the local database is updated, rather than based on
> > the dates garnered by the sync.  Can it be made to match the web
> > site? (Same for "created".)
> > 
> > 2)
> > For peeringdb-py it may be useful to make it so diagnostic output is
> > all to stdout, while errors are to stderr.  That way folks using it
> > in a crontab with "peeringdb sync > /dev/null" won't get an email
> > unless there is an actual error logged to stderr.  And in that case
> > the email will be useful for chasing down the error.  These lines are
> > going to stderr, when they would best be going to stdout:
> > 
> >   Starting new HTTPS connection (1): www.peeringdb.com
> >   "GET /api/org?since=1458111034 HTTP/1.1" 200 None
> > 
> > 3)
> > For the crontab example at:
> > 
> >   http://peeringdb.github.io/peeringdb-py/cli/
> > 
> > it may be a good idea to avoid a thundering herd, from everyone
> >   following that example, by having a random duration sleep of
> >   between 0 and 10 minutes.  For example:
> > 
> >   crontab -l | { cat; echo "0 0 * * * sleep \$[RANDOM\%600] ; `which
> >   peeringdb` sync > /dev/null 2>&1"; } | crontab -
> > 
> > (Remove the '2>&1' if #2 suggestion is accepted.)
> > 
> > Thanks,
> > Chris


More information about the Pdb-tech mailing list