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

Already on GitHub? Sign in to your account

Added timeout as a parameter for command line tools #61

merged 5 commits into from Apr 4, 2012


None yet
2 participants

Sergyenko commented Apr 4, 2012

No description provided.

@ryanwilliamson ryanwilliamson commented on the diff Apr 4, 2012

@@ -108,10 +108,10 @@ def send_push(type, payload = nil, target = nil, opts = {})
# === Return
# result(Hash):: contents of response
- def query_tags(tags, agent_ids = nil)
+ def query_tags(tags, agent_ids=nil, timeout=120)

ryanwilliamson Apr 4, 2012


Very minor comment, but I noticed in both resource files you are specifying a default of 120 seconds for @new_resource.timeout which gets passed to this call, so it seems that this line can just be:

def query_tags(tags, agent_ids=nil, timeout)

This would minimize the number of places in the code where one has to look for the default.


Sergyenko Apr 4, 2012


Unfortunately, we forced to set timeout as an optional parameter because we have the optional parameter agent_ids before. We can switch them and use the following definition:

def query_tags(tags, timeout, agent_ids=nil)

But in this case we need to modify all existing requests of query_tags.

I was thinking about it, but I didn't find the better solution.


ryanwilliamson Apr 4, 2012


Make sense.

ryanwilliamson added a commit that referenced this pull request Apr 4, 2012

Merge pull request #61 from rightscale/azure_12_3_command_line_tools
Added timeout as a parameter for command line tools

@ryanwilliamson ryanwilliamson merged commit f9b3955 into master Apr 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment