MCPcopy Create free account
hub / github.com/celery/celery / handle_remote_command_error

Function handle_remote_command_error

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

Source from the content-addressed store, hash-verified

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

Callers 6

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

Calls 1