{"action":"closed","issue":{"url":"https://api.github.com/repos/andymccurdy/redis-py/issues/1070","repository_url":"https://api.github.com/repos/andymccurdy/redis-py","labels_url":"https://api.github.com/repos/andymccurdy/redis-py/issues/1070/labels{/name}","comments_url":"https://api.github.com/repos/andymccurdy/redis-py/issues/1070/comments","events_url":"https://api.github.com/repos/andymccurdy/redis-py/issues/1070/events","html_url":"https://github.com/andymccurdy/redis-py/issues/1070","id":381313845,"node_id":"MDU6SXNzdWUzODEzMTM4NDU=","number":1070,"title":"async flushdb()","user":{"login":"rogeryen","id":16497194,"node_id":"MDQ6VXNlcjE2NDk3MTk0","avatar_url":"https://avatars0.githubusercontent.com/u/16497194?v=4","gravatar_id":"","url":"https://api.github.com/users/rogeryen","html_url":"https://github.com/rogeryen","followers_url":"https://api.github.com/users/rogeryen/followers","following_url":"https://api.github.com/users/rogeryen/following{/other_user}","gists_url":"https://api.github.com/users/rogeryen/gists{/gist_id}","starred_url":"https://api.github.com/users/rogeryen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogeryen/subscriptions","organizations_url":"https://api.github.com/users/rogeryen/orgs","repos_url":"https://api.github.com/users/rogeryen/repos","events_url":"https://api.github.com/users/rogeryen/events{/privacy}","received_events_url":"https://api.github.com/users/rogeryen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-15T19:50:58Z","updated_at":"2018-11-15T19:58:13Z","closed_at":"2018-11-15T19:58:13Z","author_association":"NONE","body":"Hello\r\n\r\nIs it me or is the `if` condition incorrect?\r\n\r\nIf I understand correctly the condition adds the \"ASYNC\" token if `asynchronous` is false which is the opposite of what should happen?\r\n\r\nI think this broke our tests against an old redis version that doesn't support ASYNC (pre 4.0.0)\r\n\r\nThanks for looking into this.\r\n\r\n```\r\ndef flushall(self, asynchronous=False):\r\n        \"\"\"\r\n        Delete all keys in all databases on the current host.\r\n        ``asynchronous`` indicates whether the operation is\r\n        executed asynchronously by the server.\r\n        \"\"\"\r\n        args = []\r\n        if not asynchronous:\r\n            args.append(Token.get_token('ASYNC'))\r\n        return self.execute_command('FLUSHALL', *args)\r\n\r\n    def flushdb(self, asynchronous=False):\r\n        \"\"\"\r\n        Delete all keys in the current database.\r\n        ``asynchronous`` indicates whether the operation is\r\n        executed asynchronously by the server.\r\n        \"\"\"\r\n        args = []\r\n        if not asynchronous:\r\n            args.append(Token.get_token('ASYNC'))\r\n        return self.execute_command('FLUSHDB', *args)\r\n```"}}
{"actor":{"display_login":"andymccurdy"}}