Skip to content

add HTTP API server

Alexander Rodionov requested to merge api into master
  • use async architecture (return task id, run task on separate worker), Run 2 docker compose services: 1 is lightweight fastapi server, and second is worker with heavy load
  • v1_upd: use gitlab api to get number of running pipelines instead of using redis project.pipelines.list(status='running')
  • v1: store state in redis but use python semaphore, but sync it's state with redis to allow restarts
  • v1: rate limiter without proper handling of race conditions, just check some key in redis
  • v2: handle race conditions
  • put every request to queue (always return token, don't return max jobs reached) and then have some worker that reads from that queue and process tasks
Edited by Alexander Rodionov

Merge request reports

Loading