Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin privileges required to boot RQ Worker #2093

Open
AGuyCalledJP opened this issue May 22, 2024 · 0 comments
Open

Admin privileges required to boot RQ Worker #2093

AGuyCalledJP opened this issue May 22, 2024 · 0 comments

Comments

@AGuyCalledJP
Copy link

Hello, in the following code in worker.py

        if prepare_for_work:
            self.hostname: Optional[str] = socket.gethostname()
            self.pid: Optional[int] = os.getpid()
            try:
                connection.client_setname(self.name)
            except redis.exceptions.ResponseError:
                warnings.warn('CLIENT SETNAME command not supported, setting ip_address to unknown', Warning)
                self.ip_address = 'unknown'
            else:
                client_adresses = [client['addr'] for client in connection.client_list() if client['name'] == self.name]
                if len(client_adresses) > 0:
                    self.ip_address = client_adresses[0]
                else:
                    warnings.warn('CLIENT LIST command not supported, setting ip_address to unknown', Warning)
                    self.ip_address = 'unknown'

The CLIENT LIST command is required in order to initialize a worker.

The CLIENT LIST command is marked as admin, slow, and dangerous in the official redis documentation, and is often a permission that is denied in managed Redis offerings, making adoption of RQ more difficult.

Is there something that can be done to avoid this admin permission requirement without changing the overall functionality of the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant