User Tools

Site Tools


witt_reports

Witt Reports

This project was initiated by a customer request: https://trello.com/c/o1Rs0TcH/259-witt-api-for-sold-out-products-in-visualytics The reports need to be updated daily (except style_cover, which changes weekly)

High level Description

This solution is split into two components:

<HTML><ol></HTML>

  • A FastAPI service that provides two endpoints to generate the required CSV files
  • A bash script that calls the service and stores the result in a location that can be accessed by the customer<HTML></ol></HTML>

Operations

The service to generate the report lives on pci01.picalike.corpex-kunden.de, while the cronjob to store the report on a webserver lives on frontend01.picalike.corpex-kunden.de

Deploy this service

It is installed via docker. In the git are bash skripts for deployment to pci01. It follows the typical

  • bash ice_tea_build.sh
  • bash ice_tea_push.sh
  • bash ice_tea_deploy.sh

cycle.

Start this service

  • on pci01: cd ~/docker_bin/witt_reports/ ; bash ice_tea_run.sh
  • on frontend01: bash ~/bin/witt_reports.sh

Use this service

Repair this service

  • your guess is as good as mine
  • restarting the docker container on pci01 might help

Known Issues

  • not connected to any serivce discovery service (intentionally not connected to zookeeper)
  • logging does not have timestamps
  • logging needs general improvement

Super Special Knowledge

  • The webservice performs a lot of calls to pci-server:/get_product_metaData in an asynchronous fashion.
  • The list of witt shops is currently hard coded in main.py (problem for future self)
  • pci-server is hard coded to http://pci01.picalike.corpex-kunden.de:8090
  • the docker container is restarted every morning at 7 AM to avoid memory issues
  • the report generation is triggered via cronjob on picalike@frontend01.picalike.corpex-kunden.de (not HPC)

Experiments / Results / Knowledge Base

You performed a test? share it.

Dependencies

Incident Log

Authors

<HTML><ol></HTML>

witt_reports.txt · Last modified: 2024/04/11 14:23 by 127.0.0.1