[PDB-tech] peeringdb-py feedback

Matt Griswold grizz at 20c.com
Mon Mar 21 02:52:55 PDT 2016


Sorry for the delay, I've been focusing on the PDB 2.0 release.

* Chris Caputo <ccaputo at alt.net> [160316 09:55 +0000]:
> I am happy to report the Seattle IX is now utilizing PeeringDB 2.0 to 
> supplement its web site and route server configs.
> 
> In case useful for other sites, my total development time to change
> from PDB 1.0's mysql tables to installing and using peeringdb-py with
> sqlite was under 3.5 hours.
Good to hear!

> 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 :)

> 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
> _______________________________________________
> Pdb-tech mailing list
> Pdb-tech at lists.peeringdb.com
> http://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech



More information about the Pdb-tech mailing list