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

Allow VW() instances to connect to existing VW daemons #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mokelly
Copy link
Owner

@mokelly mokelly commented Nov 19, 2014

Addresses #3:

--VW() can connect to existing VW daemons
--daemon_mode can be used to launch a daemon VW instance and connect automatically

@mokelly mokelly mentioned this pull request Nov 19, 2014
@ztane
Copy link
Contributor

ztane commented Nov 20, 2014

Btw, given ip 10.12.34.56 and port 666, one gets:

File "wabbit_wappa/active_learner.py", line 74, in __init__
    raise
RuntimeError: No active exception to reraise

That is, raise is valid in except block only

@ztane
Copy link
Contributor

ztane commented Nov 20, 2014

Ah, also, in any prod setting, if connection to existing daemon fails, I want to get the exception instantaneously and not 5 seconds later ;)

@ztane
Copy link
Contributor

ztane commented Nov 20, 2014

thus at least

    while True:
        ...
        except socket.error:
            connection_tries += 1
            if connection_tries >= MAX_CONNECTION_TRIES:
                raise socket.error

            time.sleep(CONNECTION_WAIT)

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

Successfully merging this pull request may close these issues.

2 participants