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

Add logger when worker is waiting for master to connect #2199

Closed
alvaro-ajv opened this issue Sep 14, 2022 · 0 comments
Closed

Add logger when worker is waiting for master to connect #2199

alvaro-ajv opened this issue Sep 14, 2022 · 0 comments

Comments

@alvaro-ajv
Copy link

alvaro-ajv commented Sep 14, 2022

Want to add a logger to the runners.py when worker is waiting for the master to be running, I already have the code but I need access to push the branch. Also want to start contributing to this repo. Thanks

Code:

    def connect_to_master(self):
        self.retry += 1
        logger.info("Waiting for master to be ready")
        self.client.send(Message("client_ready", __version__, self.client_id))
        success = self.connection_event.wait(timeout=CONNECT_TIMEOUT)
        if not success:
            if self.retry > CONNECT_RETRY_COUNT:
                logger.error(
                    f"Failed to connect to master {self.master_host}:{self.master_port}, after {CONNECT_RETRY_COUNT} retries"
                )
                raise ConnectionError()
            self.connect_to_master()
        self.connected = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant