Skip to content

Introduction

Pydcs is the codebase that handles the data collect servers (DCS). The idea of pydcs is to receive incoming data collected from our tag, validate and then queue it in our server as a visit.

The server is constantly running a loop to get updated account, events, pattern and endpoint information to ensure it always has the most up to date information1. Once the server has queued the visit any available workers belonging to the server will begin to try to insert the visit into the database. If it fails it will simply requeue the visit. If the queue is full any further visits will not be stored and will be instead thrown away.

Contents

  1. Main.py
  2. Server.py
  3. Worker.py

1. The server will try to update its own native account information where the database account information is newer. Therefore should you need to manually edit a field in Heidi be sure to always update the updated field with todays date and time. This will flag to the DCS that newer information is available, allowing it to update its stores.