Database

We support Oracle and Postgres databases.

Multiple hosts

The dsn parameter of service database config should be specified to enable multihost option for Postgres.

DSN may be specified in the following format: luna:luna@postgres01:5432,postgres02:5432/luna_tasks?some_option=some_value. It is possible to partially fill in the DSN string (e.g. postgres01,postgres02/luna_tasks), and then the missing parameters will be filled in from proprietary parameter values (or defaults).

At startup, the service will create a pool of connections to one of DSN hosts available. In case of problems with establishing a connection after several unsuccessful attempts, the service will again try to set up a connection pool to any of DSN hosts available.

DB scheme.

_images/tasks_db.png

Tasks database models.

class luna_tasks.db.tasks_db_tools.models.tasks_models.SubTask(**kwargs)[source]

SubTask.

class luna_tasks.db.tasks_db_tools.models.tasks_models.Task(**kwargs)[source]

Task.

class luna_tasks.db.tasks_db_tools.models.tasks_models.TaskError(**kwargs)[source]

Task errors.