Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7122960
D3248.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
921 B
Subscribers
None
D3248.diff
View Options
diff --git a/swh/scheduler/cli/__init__.py b/swh/scheduler/cli/__init__.py
--- a/swh/scheduler/cli/__init__.py
+++ b/swh/scheduler/cli/__init__.py
@@ -37,6 +37,13 @@
Use a local scheduler instance by default (plugged to the
main scheduler db).
"""
+ try:
+ from psycopg2 import OperationalError
+ except ImportError:
+
+ class OperationalError(Exception):
+ pass
+
from swh.core import config
from swh.scheduler.celery_backend.config import setup_log_handler
from swh.scheduler import get_scheduler, DEFAULT_CONFIG
@@ -67,7 +74,7 @@
try:
logger.debug("Instantiating scheduler with %s" % (sched_conf))
scheduler = get_scheduler(**sched_conf)
- except ValueError:
+ except (ValueError, OperationalError):
# it's the subcommand to decide whether not having a proper
# scheduler instance is a problem.
pass
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 17 2024, 1:31 PM (13 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217223
Attached To
D3248: Replace swh-worker-control with a swh scheduler celery-monitor subcommand
Event Timeline
Log In to Comment