HomeSoftware Heritage

Handle psycopg2 OperationalError in cli initialization

Description

Handle psycopg2 OperationalError in cli initialization

When running the cli with default settings (i.e. pointing to a
softwareheritage-scheduler-dev database), and the database doesn't exist, an
OperationalError is raised.

This shouldn't prevent (some of the) cli subcommands from working, so catch this
error and ignore it as one of the scheduler backend setup failure modes.

Details

Provenance
olasdAuthored on Jun 10 2020, 11:28 AM
olasdPushed on Jun 10 2020, 12:33 PM
Differential Revision
D3248: Replace swh-worker-control with a swh scheduler celery-monitor subcommand
Parents
rDSCH28c5b8d479c2: Replace vcversioner with setuptools-scm
Branches
Unknown
Tags
Unknown
Build Status
Buildable 12739
Build 19375: test-and-buildJenkins console · Jenkins