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)),
```
tests/cli/commands/test_celery_command.py
@mock.patch('airflow.settings.validate_session')
    def test_error(self, mock_validate_session):
        """
        Test to verify the exit mechanism of airflow-worker cli
        by mocking validate_session method
        """
        mock_validate_session.return_value = False
        with self.assertRaises(SystemExit) as cm:
            celery_command.worker(Namespace(queues=1, concurrency=1))
        self.assertEqual(cm.exception.code, 1)
    @conf_vars({('core', 'worker_precheck'): 'False'})
    def test_worker_precheck_exception(self):
        """
        Test to check the behaviour of validate_session method
        when worker_precheck is absent in airflow configuration
        """
        self.assertTrue(airflow.settings.validate_session())
    @mock.patch('sqlalchemy.orm.session.Session.execute')
    @conf_vars({('core', 'worker_precheck'): 'True'})
    def test_validate_session_dbapi_exception(self, mock_session):
        """
        Test to validate connection failure scenario on SELECT 1 query
        """
        mock_session.side_effect = sqlalchemy.exc.OperationalError("m1", "m2", "m3", "m4")
        self.assertEqual(airflow.settings.validate_session(), False)
@pytest.mark.integration("redis")
@pytest.mark.integration("rabbitmq")
@pytest.mark.backend("mysql", "postgres")
class TestWorkerServeLogs(unittest.TestCase):