Service bookkeeper

bookkeeper.py

The bookkeeper service of mercure, which receives notifications from all mercure services and stores the information in a Postgres database.

bookkeeper.connection: sqlalchemy.engine.base.Connection
bookkeeper.create_database() None[source]

Creates all tables in the database if they do not exist.

async bookkeeper.execute_db_operation(operation) None[source]
bookkeeper.main(args=['-b', 'html', '-d', '_build/doctrees', '.', '_build/html']) None[source]
async bookkeeper.parse_and_submit_tags(payload) None[source]
async bookkeeper.post_mercure_event(request) starlette.responses.JSONResponse[source]

Endpoint for receiving mercure system events.

async bookkeeper.post_series_event(request) starlette.responses.JSONResponse[source]

Endpoint for logging all events related to one series.

async bookkeeper.post_webgui_event(request) starlette.responses.JSONResponse[source]

Endpoint for logging relevant events of the webgui.

async bookkeeper.register_dicom(request) starlette.responses.JSONResponse[source]

Endpoint for registering newly received DICOM files. Called by the getdcmtags module.

async bookkeeper.register_series(request) starlette.responses.JSONResponse[source]

Endpoint that is called by the router whenever a new series arrives.

async bookkeeper.shutdown() None[source]

Disconnect from database on shutdown.

async bookkeeper.startup() None[source]

Connects to database on startup. If the database does not exist, it will be created.

async bookkeeper.test_endpoint(request) starlette.responses.JSONResponse[source]

Endpoint for testing that the bookkeeper is active.