{"action":"created","issue":{"url":"https://api.github.com/repos/SMART-Lab/smartdispatch/issues/127","repository_url":"https://api.github.com/repos/SMART-Lab/smartdispatch","labels_url":"https://api.github.com/repos/SMART-Lab/smartdispatch/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/SMART-Lab/smartdispatch/issues/127/comments","events_url":"https://api.github.com/repos/SMART-Lab/smartdispatch/issues/127/events","html_url":"https://github.com/SMART-Lab/smartdispatch/pull/127","id":149598607,"number":127,"title":"Small bug fix","user":{"login":"mgermain","id":1077147,"avatar_url":"https://avatars.githubusercontent.com/u/1077147?v=3","gravatar_id":"","url":"https://api.github.com/users/mgermain","html_url":"https://github.com/mgermain","followers_url":"https://api.github.com/users/mgermain/followers","following_url":"https://api.github.com/users/mgermain/following{/other_user}","gists_url":"https://api.github.com/users/mgermain/gists{/gist_id}","starred_url":"https://api.github.com/users/mgermain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgermain/subscriptions","organizations_url":"https://api.github.com/users/mgermain/orgs","repos_url":"https://api.github.com/users/mgermain/repos","events_url":"https://api.github.com/users/mgermain/events{/privacy}","received_events_url":"https://api.github.com/users/mgermain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-19T22:12:43Z","updated_at":"2016-04-21T20:52:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SMART-Lab/smartdispatch/pulls/127","html_url":"https://github.com/SMART-Lab/smartdispatch/pull/127","diff_url":"https://github.com/SMART-Lab/smartdispatch/pull/127.diff","patch_url":"https://github.com/SMART-Lab/smartdispatch/pull/127.patch"},"body":"First, there was 2 missing blank lines in the README.\r\n\r\nSecond, we were doing this:\r\n```\r\nget_available_queues(cluster_name=utils.detect_cluster()):\r\n```\r\n\r\nWhich was calling `qstat` every time this function was imported.\r\n\r\nAnd `smartdispatch/__init__.py` was importing it `from smartdispatch.smartdispatch import *`.\r\n\r\nSo `qstat` was called way too often for no reasons.\r\n"},"comment":{"url":"https://api.github.com/repos/SMART-Lab/smartdispatch/issues/comments/213109571","html_url":"https://github.com/SMART-Lab/smartdispatch/pull/127#issuecomment-213109571","issue_url":"https://api.github.com/repos/SMART-Lab/smartdispatch/issues/127","id":213109571,"user":{"login":"mgermain","id":1077147,"avatar_url":"https://avatars.githubusercontent.com/u/1077147?v=3","gravatar_id":"","url":"https://api.github.com/users/mgermain","html_url":"https://github.com/mgermain","followers_url":"https://api.github.com/users/mgermain/followers","following_url":"https://api.github.com/users/mgermain/following{/other_user}","gists_url":"https://api.github.com/users/mgermain/gists{/gist_id}","starred_url":"https://api.github.com/users/mgermain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgermain/subscriptions","organizations_url":"https://api.github.com/users/mgermain/orgs","repos_url":"https://api.github.com/users/mgermain/repos","events_url":"https://api.github.com/users/mgermain/events{/privacy}","received_events_url":"https://api.github.com/users/mgermain/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T20:52:17Z","updated_at":"2016-04-21T20:52:17Z","body":"@MarcCote you might be right. I was trying this error that happen sometime. \r\n```\r\npbs_iff: cannot connect to mp2:15001 - timeout, errno=99 (Cannot assign requested address)\r\nNo Permission.\r\nqstat: cannot connect to server mp2 (errno=15007) Unauthorized Request\r\nTraceback (most recent call last):\r\n  File \"/home/germainm/smartdispatch/smartdispatch/workers/base_worker.py\", line 10, in <module>\r\n    from smartdispatch import utils\r\n  File \"/home/germainm/smartdispatch/smartdispatch/__init__.py\", line 2, in <module>\r\n    from smartdispatch.smartdispatch import *\r\n  File \"/home/germainm/smartdispatch/smartdispatch/smartdispatch.py\", line 108, in <module>\r\n    def get_available_queues(cluster_name=utils.detect_cluster()):\r\n  File \"/home/germainm/smartdispatch/smartdispatch/utils.py\", line 99, in detect_cluster\r\n    server_name = output.split('\\n')[2].split(' ')[0]\r\nIndexError: list index out of range\r\n```\r\n\r\nIt might not be the right way but the `def get_available_queues(cluster_name=utils.detect_cluster()):` does not feel clean. Is there any standard/good practice with default value of named parameter and function ?"}}