Repository: celery/celery

Issue:
Why has the CLI worker command flag `optimizations` changed from `--optimizations` in 5.*?
This question is referencing this code:

https://github.com/celery/celery/blob/3b1c768c39f641a70d3086bd5a1079a421f94344/celery/bin/worker.py#L169
```
@click.option('optimization',
              '-O',
              default='default',
              cls=CeleryOption,
              type=click.Choice(('default', 'fair')),
              help_group="Worker Options",
              help="Apply optimization profile.")
```
Why has the flag removed the double hyphen? It seems like a bug, but I assume there was a reason for it? The reason I'm asking is that this change breaks a bunch of code we have, so I'd like to understand the change.               
Why has the CLI worker command flag `optimizations` changed from `--optimizations` in 5.*?
This question is referencing this code:

https://github.com/celery/celery/blob/3b1c768c39f641a70d3086bd5a1079a421f94344/celery/bin/worker.py#L169
```
@click.option('optimization',
              '-O',
              default='default',
              cls=CeleryOption,
              type=click.Choice(('default', 'fair')),
              help_group="Worker Options",
              help="Apply optimization profile.")
```
Why has the flag removed the double hyphen? It seems like a bug, but I assume there was a reason for it? The reason I'm asking is that this change breaks a bunch of code we have, so I'd like to understand the change.               


Discussion:
Hey @stuart-bradley :wave:,
Thank you for opening an issue. We will get back to you as soon as we can.
Also, check out our [Open Collective](https://opencollective.com/celery) and consider backing us - every little helps!

We also offer priority support for our sponsors.
If you require immediate assistance please consider sponsoring us.

@thedrow was this an intended change? @stuart-bradley  we actually moved the CLI from argparse to click in version 5 on wards, so that might cause it. or it could be a typo
Hey team, has there been any movement on this? 
we switched from argparse to click library. may be that could be a reason
Hey @stuart-bradley :wave:,
Thank you for opening an issue. We will get back to you as soon as we can.
Also, check out our [Open Collective](https://opencollective.com/celery) and consider backing us - every little helps!

We also offer priority support for our sponsors.
If you require immediate assistance please consider sponsoring us.

@thedrow was this an intended change? @stuart-bradley  we actually moved the CLI from argparse to click in version 5 on wards, so that might cause it. or it could be a typo
Hey team, has there been any movement on this? 
we switched from argparse to click library. may be that could be a reason

Resolving patch:
diff --git a/celery/bin/worker.py b/celery/bin/worker.py
--- a/celery/bin/worker.py
+++ b/celery/bin/worker.py
@@ -166,8 +166,8 @@ def detach(path, argv, logfile=None, pidfile=None, uid=None,
               type=LOG_LEVEL,
               help_group="Worker Options",
               help="Logging level.")
-@click.option('optimization',
-              '-O',
+@click.option('-O',
+              '--optimization',
               default='default',
               cls=CeleryOption,
               type=click.Choice(('default', 'fair')),


Test patch: