Closed bpepple closed 3 years ago
Incredible work, thank you. Gives me some ideas for cleanup my messy code in other areas. Things like cache and testing were on my roadmap but hadn't taken a look at getting it implemented yet, this is a great start thanks
Was doing my weekly review of Metron's server logs, and notices that you were hitting Metron numerous time for the same data (primarily Publish & Series queries). I wrote a python wrapper to Metron Api, Mokkari, that has basic caching and as an added bonus should simplify you code a bit.
You may want modify the code to regenerate the cache db periodically, though really most of the data once it's added to Metron doesn't change often, so that might not be necessary depends on your user-case.
Also, added some initial tests to verify the handling of the parsing code hasn't change.
Any questions, don't hesitate to contact me.