Code Monkey home page Code Monkey logo

chronos's Introduction

TC - Chronos

Welcome to TC - Chronos. This is a microservice that takes on all the webhook work from TC. Before creation of Chronos, about 50% of the database was taken up by webhook logs & failed deliveries are causing some slowness in jobs etc. To battle this we will simply send 1 request from TC2 to Chronos per webhook then let chronos manage the rest.

Functionality

This means the Chronos needs some certain functionality:

  • An object for storing endpoints where our clients wish webhooks to be sent to

  • An object for storing information about the webhook logs

  • An endpoint for CRUD operations on the Endpoint objects

  • An endpoint for retrieving webhook logs to be displayed in TC2

  • An endpoint for distributing webhooks to all Endpoints related to a branch

  • A job that runs periodically deleting all logs older than 15 days

SetUp

To set up the Chronos system locally follow these steps:

  1. Create the DB in Postgres by calling make reset-db
  2. Create the tables by calling python -m chronos.scripts.create_db_tables
  3. Start the server using python -m uvicorn chronos.main:app --reload
  4. Start the celery worker with celery -A chronos.worker worker --loglevel=info

chronos's People

Contributors

henrytraill avatar dependabot[bot] avatar

Watchers

Tom Hamilton Stubber avatar  avatar

chronos's Issues

TODO

  • Change delete endpoint to signed dict
  • Change get logs to signed dict
  • Add logfire
  • Add sentry reporting
  • Fix naming conventions
  • Fix doc strings
  • Get explicit with comments
  • Complete test coverage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.