The recent [refactoring of the celery Worker process](https://github.com/apache/airflow/commit/02ce45cafec22a0a80257b2144d99ec8bb41c961) dropped the use of `celery.bin.worker.Worker()`, and switched to using the `celery.app.worker.Worker()` class more directly.

Unfortunately, it was the task of the former to format the [Celery hostname patterns](https://docs.celeryproject.org/en/latest/reference/cli.html?highlight=hostname#cmdoption-celery-worker-n).

Unfortunately this refactoring dropped support for hostname patterns (`%h`, `%n`, etc.). Can we re-introduce these? All that is needed is a few `celery.utils.nodenames` calls:

```python
from celery.utils.nodenames import default_nodename, host_format

        # ...
        'hostname': host_format(default_nodename(args.celery_hostname)),
```
airflow/cli/commands/celery_command.py
ctx = daemon.DaemonContext(
            files_preserve=[handle],
            umask=int(umask, 8),
            stdout=stdout,
            stderr=stderr,
        )
        with ctx:
            sub_proc = _serve_logs(skip_serve_logs)
            worker_instance.start()
        stdout.close()
        stderr.close()
    else:
        
        sub_proc = _serve_logs(skip_serve_logs)
        worker_instance.start()
    if sub_proc:
        sub_proc.terminate()
@cli_utils.action_logging
def stop_worker(args):  
    """Sends SIGTERM to Celery worker"""
    
    pid_file_path, _, _, _ = setup_locations(process=WORKER_PROCESS_NAME)
    pid = read_pid_from_pidfile(pid_file_path)
    
    if pid:
        worker_process = psutil.Process(pid)
        worker_process.terminate()
    
    remove_existing_pidfile(pid_file_path)