Merge lp:~allenap/maas/reduce-wait-for-client into lp:~maas-committers/maas/trunk

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: no longer in the source branch.
Merged at revision: 2799
Proposed branch: lp:~allenap/maas/reduce-wait-for-client
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 19 lines (+2/-2)
1 file modified
src/maasserver/rpc/__init__.py (+2/-2)
To merge this branch: bzr merge lp:~allenap/maas/reduce-wait-for-client
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Review via email: mp+231968@code.launchpad.net

Commit message

Don't wait for a cluster RPC connection by default.

For now it's safer to immediately return when there's no RPC connection available to a specified cluster. Time-outs can block the web application for long periods of unproductive time. We will be better served by making callers better able to deal with an unstable environment. The option of waiting remains though, for code that really needs it.

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Branch is to large! :)

Looks good.

review: Approve
Revision history for this message
Gavin Panella (allenap) wrote :

Thanks :)

Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Friday 22 August 2014 21:28:13 you wrote:
> Branch is to large! :)

This has immensely cheered up my Monday morning, haha.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/rpc/__init__.py'
2--- src/maasserver/rpc/__init__.py 2014-08-18 11:34:42 +0000
3+++ src/maasserver/rpc/__init__.py 2014-08-22 21:16:43 +0000
4@@ -26,13 +26,13 @@
5
6
7 @asynchronous(timeout=FOREVER) # getClientFor handles times-out itself.
8-def getClientFor(uuid, timeout=30):
9+def getClientFor(uuid, timeout=0):
10 """getClientFor(uuid)
11
12 Get a client with which to make RPCs to the specified cluster.
13
14 :param timeout: The number of seconds to wait before giving up
15- getting a connection.
16+ getting a connection. By default, `timeout` is 0.
17 :raises: :py:class:`~.exceptions.NoConnectionsAvailable` when there
18 are no open connections to the specified cluster controller.
19 """