|
4 | 4 | import click |
5 | 5 | from kombu.utils.json import dumps |
6 | 6 |
|
7 | | -from celery.bin.base import COMMA_SEPARATED_LIST, CeleryCommand, CeleryOption |
| 7 | +from celery.bin.base import (COMMA_SEPARATED_LIST, CeleryCommand, |
| 8 | + CeleryOption, handle_preload_options) |
8 | 9 | from celery.platforms import EX_UNAVAILABLE |
9 | 10 | from celery.utils import text |
10 | 11 | from celery.worker.control import Panel |
@@ -71,6 +72,7 @@ def _compile_arguments(action, args): |
71 | 72 | help_group='Remote Control Options', |
72 | 73 | help='Use json as output format.') |
73 | 74 | @click.pass_context |
| 75 | +@handle_preload_options |
74 | 76 | def status(ctx, timeout, destination, json, **kwargs): |
75 | 77 | """Show list of workers that are online.""" |
76 | 78 | callback = None if json else partial(_say_remote_command_reply, ctx) |
@@ -115,6 +117,7 @@ def status(ctx, timeout, destination, json, **kwargs): |
115 | 117 | help_group='Remote Control Options', |
116 | 118 | help='Use json as output format.') |
117 | 119 | @click.pass_context |
| 120 | +@handle_preload_options |
118 | 121 | def inspect(ctx, action, timeout, destination, json, **kwargs): |
119 | 122 | """Inspect the worker at runtime. |
120 | 123 |
|
@@ -164,6 +167,7 @@ def inspect(ctx, action, timeout, destination, json, **kwargs): |
164 | 167 | help_group='Remote Control Options', |
165 | 168 | help='Use json as output format.') |
166 | 169 | @click.pass_context |
| 170 | +@handle_preload_options |
167 | 171 | def control(ctx, action, timeout, destination, json): |
168 | 172 | """Workers remote control. |
169 | 173 |
|
|
0 commit comments