Sign inSign up

pacifica/dispatcher-proxymod-frontend

By pacifica

•Updated about 7 years ago

Image
0

252

pacifica/dispatcher-proxymod-frontend repository overview

⁠Pacifica Dispatcher for proxymod

Build Status Build status Maintainability Test Coverage

This is the Pacifica Notifications Service for proxymod⁠.

⁠The Parts

There are several parts to this code as it encompasses integrating several python libraries together.

For each major library we have integration points in specific modules to handle configuration of each library.

⁠PeeWee

The configuration of PeeWee is pulled from the DATABASE_URL environment variable, whose value is a database connection url⁠.

⁠CherryPy

The CherryPy configuration has two entry points for use. The WSGI interface and the embedded server through the main method.

⁠Celery

The Celery tasks are located in their own module and have an entry point from the CherryPy REST objects. The tasks save state into a PeeWee database that is also accessed in the CherryPy REST objects.

The configuration of Celery is pulled from the BACKEND_URL and BROKER_URL environment variables, whose values are the connection URLs for the backend and message broker, respectively.

⁠Start Up Process

The default way to start up this service is with a shared SQLite database. The database must be located in the current working directory of both the celery workers and the CherryPy web server. The messaging system in Travis⁠ and Appveyor⁠ is Redis, however the default is RabbitMQ.

There are three commands needed to start up the services. Perform these steps in three separate terminals.

  1. docker-compose up rabbit
  2. env DATABASE_URL="sqliteext:///db.sqlite3" celery -A "pacifica.dispatcher_proxymod.__main__:celery_app" worker -l info
  3. env DATABASE_URL="sqliteext:///db.sqlite3" python3 -m "pacifica.dispatcher_proxymod.__main__"

⁠Testing

To test, perform these steps:

  1. python3 -m unittest pacifica/dispatcher/proxymod/tests/test_*.py

Tag summary

Content type

Image

Digest

Size

336.9 MB

Last updated

about 7 years ago

docker pull pacifica/dispatcher-proxymod-frontend