Skip to content

Dans-labs/pid-resolution-monitor

Repository files navigation

PID Resolution Monitor

Dependencies will be installed by Poetry

Prerequisite

  1. Python
  2. RabbitMQ instance
  3. (postgres) DB instance

Run the Application

  1. Start a Docker RabbitMQ container with management app:
$ docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.13-management
  1. Start a Docker Postgres container:
$ docker run --name pidresolution -e POSTGRES_PASSWORD=<<pwd>> -e POSTGRES_USER=<<user>> -d -p 5432:5432 postgres
  1. Run the main app:
$ python main.py
  1. Start the Celery process, navigate to the project directory in a new terminal, activate the virtual environment, and then run:
$ celery -A main.celery worker -l INFO -Q pid-resolution,pidmr,celery --autoscale=1,10

Or start Celery with other options:

$ celery -A main.celery worker -l INFO -Q pid-resolution,pidmr –pool gevent –autoscale=10,1000
$ celery -A main.celery worker --concurrency=10 -l=DEBUG --without-mingle --without-gossip --without-heartbeat

Flower

Flower is a real-time web application monitoring and administration tool for Celery. Optionally we can monitor the tasks submitted to Celery. To start the Flower process, Navigate to the project directory in a new terminal, activate the virtual environment, and then run:

$ celery -A main.celery flower --port=5555

Once the Flower starts we can see the submitted tasks at http://localhost:5555/tasks.

Test the application

Visit http://localhost:9000/docs to see the API documentation provided by Swagger UI

PID Resolver Resolution Client Properties

  • Default timeout of 30 seconds, meaning the request times out if a server does not respond within this time frame.
  • All methods are configured to follow a maximum of 20 redirects.
  • GET request that includes typical browsing parameters such as user agent and accepted cookies with HTTPX library

References

About

A service that monitors and logs the resolution of PIDs

Resources

License

Stars

Watchers

Forks

Packages

No packages published