====== GET CATEGORY TRENDS ====== * Git: https://git.picalike.corpex-kunden.de/incubator/v5-get-category-trends * Monitoring: corpex via nagios every minute (dev01: v5 slack monitoring) HINT: This is the first V5 live service so be careful with deployments and restarts ===== Service ===== * Base: FastAPI * Host: frontend05-hpc * Endpoint: /get_cat_trends * Docs: http://frontend05-hpc.picalike.corpex-kunden.de:5003/docs * Example call: http://frontend05-hpc.picalike.corpex-kunden.de:5003/get_cat_trends/?key=cGljc2ltaWxhcjo0MTQ5&i=&limit=12&format=json&r=1&size=&session=a92f30de5578ba7550dcf5e58aeea7ba&testid=5cdb43db36fd9 For an input overview check the API documentation: http://frontend05-hpc.picalike.corpex-kunden.de:5003/docs The Response is a dict containing meta fields and “ids” which is a dict containing the data. ===== Components ===== * PostgreSQL (backend): psql02 (live), materialized view ''%%trends%%'' * Frontend: frontend-hpc05 * refresh: runs on dev02 as a cronjob /home/picalike/v5/scripts/refresh_trend_data.sh hourly * billing: frontend05-hpc is written to disk and collection by billing2zero.py ===== Test via Customer ===== Example call of customer to see if it works: https://www.madeleine.de/search?text=asdf This should result in products shown at the bottom that are filled by this service. The idea is to provide results when the search query does not return any matches. ===== Known Issues ===== Shops should be added dynamically, but right now they are hard coded at three places