MCPcopy
hub / github.com/celery/celery / handle_remote_command_error

Function handle_remote_command_error

celery/bin/base.py:123–140  ·  view source on GitHub ↗
(command: str, exc: Exception)

Source from the content-addressed store, hash-verified

121
122
123def handle_remote_command_error(command: str, exc: Exception) -> None:
124 if isinstance(exc, click.ClickException):
125 raise
126
127 if isinstance(exc, OperationalError):
128 raise CeleryCommandException(
129 message=(
130 'Could not connect to the message broker. '
131 'Please make sure your broker (e.g., RabbitMQ or Redis) is running and '
132 f'the connection settings are correct. Reason: {exc}'
133 ),
134 exit_code=EX_UNAVAILABLE,
135 ) from exc
136
137 raise CeleryCommandException(
138 message=f'Unable to run the `{command}` command. Reason: {exc}',
139 exit_code=EX_UNAVAILABLE,
140 ) from exc
141
142
143def handle_preload_options(f):

Callers 6

statusFunction · 0.90
inspectFunction · 0.90
controlFunction · 0.90
eventsFunction · 0.90
workersFunction · 0.90

Calls 1