{"action":"created","comment":{"url":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/comments/72216198","id":72216198,"diff_hunk":"@@ -0,0 +1,73 @@\n+require 'spec_helper'\n+require 'perfectqueue/backend/rdb'\n+\n+describe Backend::RDBBackend do\n+  let (:now){ Time.now.to_i }\n+  let (:uri){ 'mysql2://root:@localhost/perfectqueue_test' }\n+  let (:table){ 'test_queues' }\n+  let (:db) do\n+    d = Backend::RDBCompatBackend.new(double, url: uri, table: table)\n+    s = d.db\n+    s.tables.each{|t| s.drop_table(t) }\n+    d.init_database({})\n+    Backend::RDBBackend.new(uri, table)\n+  end\n+\n+  context '.new' do\n+    it 'supports mysql' do\n+      expect(Backend::RDBBackend.new(uri, table)).to be_an_instance_of(Backend::RDBBackend)\n+    end\n+  end\n+\n+  context '#submit' do\n+    it 'adds task' do\n+      db.submit('key', '{\"foo\":\"bar\"}')\n+      row = db.db.fetch(\"SELECT * FROM `#{table}` WHERE id=? LIMIT 1\", 'key').first\n+      expect(row[:created_at]).not_to be_nil\n+      expect(row[:data]).to eq('{\"foo\":\"bar\"}')\n+    end\n+  end\n+\n+  context '#cancel' do\n+    let (:key){ 'key' }\n+    let (:task_token){ Backend::RDBBackend::Token.new(key) }","path":"spec/rdb_backend_spec.rb","position":33,"original_position":33,"commit_id":"be4dec3ae44c59f9e699b6947b62d969fb359b5a","original_commit_id":"be4dec3ae44c59f9e699b6947b62d969fb359b5a","user":{"login":"kamipo","id":12642,"avatar_url":"https://avatars.githubusercontent.com/u/12642?v=3","gravatar_id":"","url":"https://api.github.com/users/kamipo","html_url":"https://github.com/kamipo","followers_url":"https://api.github.com/users/kamipo/followers","following_url":"https://api.github.com/users/kamipo/following{/other_user}","gists_url":"https://api.github.com/users/kamipo/gists{/gist_id}","starred_url":"https://api.github.com/users/kamipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamipo/subscriptions","organizations_url":"https://api.github.com/users/kamipo/orgs","repos_url":"https://api.github.com/users/kamipo/repos","events_url":"https://api.github.com/users/kamipo/events{/privacy}","received_events_url":"https://api.github.com/users/kamipo/received_events","type":"User","site_admin":false},"body":"Seems unused.","created_at":"2016-07-26T09:29:46Z","updated_at":"2016-07-26T09:29:46Z","html_url":"https://github.com/treasure-data/perfectqueue/pull/45#discussion_r72216198","pull_request_url":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/comments/72216198"},"html":{"href":"https://github.com/treasure-data/perfectqueue/pull/45#discussion_r72216198"},"pull_request":{"href":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/45","id":78433104,"html_url":"https://github.com/treasure-data/perfectqueue/pull/45","diff_url":"https://github.com/treasure-data/perfectqueue/pull/45.diff","patch_url":"https://github.com/treasure-data/perfectqueue/pull/45.patch","issue_url":"https://api.github.com/repos/treasure-data/perfectqueue/issues/45","number":45,"state":"open","locked":false,"title":"Merge v07 branch","user":{"login":"nurse","id":13423,"avatar_url":"https://avatars.githubusercontent.com/u/13423?v=3","gravatar_id":"","url":"https://api.github.com/users/nurse","html_url":"https://github.com/nurse","followers_url":"https://api.github.com/users/nurse/followers","following_url":"https://api.github.com/users/nurse/following{/other_user}","gists_url":"https://api.github.com/users/nurse/gists{/gist_id}","starred_url":"https://api.github.com/users/nurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nurse/subscriptions","organizations_url":"https://api.github.com/users/nurse/orgs","repos_url":"https://api.github.com/users/nurse/repos","events_url":"https://api.github.com/users/nurse/events{/privacy}","received_events_url":"https://api.github.com/users/nurse/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-22T07:06:35Z","updated_at":"2016-07-26T09:29:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48e551b309f97dbab8e604d5d8dacdd8f8bdc04d","assignee":{"login":"kamipo","id":12642,"avatar_url":"https://avatars.githubusercontent.com/u/12642?v=3","gravatar_id":"","url":"https://api.github.com/users/kamipo","html_url":"https://github.com/kamipo","followers_url":"https://api.github.com/users/kamipo/followers","following_url":"https://api.github.com/users/kamipo/following{/other_user}","gists_url":"https://api.github.com/users/kamipo/gists{/gist_id}","starred_url":"https://api.github.com/users/kamipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamipo/subscriptions","organizations_url":"https://api.github.com/users/kamipo/orgs","repos_url":"https://api.github.com/users/kamipo/repos","events_url":"https://api.github.com/users/kamipo/events{/privacy}","received_events_url":"https://api.github.com/users/kamipo/received_events","type":"User","site_admin":false},"assignees":[{"login":"kamipo","id":12642,"avatar_url":"https://avatars.githubusercontent.com/u/12642?v=3","gravatar_id":"","url":"https://api.github.com/users/kamipo","html_url":"https://github.com/kamipo","followers_url":"https://api.github.com/users/kamipo/followers","following_url":"https://api.github.com/users/kamipo/following{/other_user}","gists_url":"https://api.github.com/users/kamipo/gists{/gist_id}","starred_url":"https://api.github.com/users/kamipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamipo/subscriptions","organizations_url":"https://api.github.com/users/kamipo/orgs","repos_url":"https://api.github.com/users/kamipo/repos","events_url":"https://api.github.com/users/kamipo/events{/privacy}","received_events_url":"https://api.github.com/users/kamipo/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/45/commits","review_comments_url":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/45/comments","review_comment_url":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/treasure-data/perfectqueue/issues/45/comments","statuses_url":"https://api.github.com/repos/treasure-data/perfectqueue/statuses/be4dec3ae44c59f9e699b6947b62d969fb359b5a","head":{"label":"treasure-data:merge-v07","ref":"merge-v07","sha":"be4dec3ae44c59f9e699b6947b62d969fb359b5a","user":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"repo":{"id":2255601,"name":"perfectqueue","full_name":"treasure-data/perfectqueue","owner":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/treasure-data/perfectqueue","description":"Highly available distributed queue built on RDBMS","fork":false,"url":"https://api.github.com/repos/treasure-data/perfectqueue","forks_url":"https://api.github.com/repos/treasure-data/perfectqueue/forks","keys_url":"https://api.github.com/repos/treasure-data/perfectqueue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/treasure-data/perfectqueue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/treasure-data/perfectqueue/teams","hooks_url":"https://api.github.com/repos/treasure-data/perfectqueue/hooks","issue_events_url":"https://api.github.com/repos/treasure-data/perfectqueue/issues/events{/number}","events_url":"https://api.github.com/repos/treasure-data/perfectqueue/events","assignees_url":"https://api.github.com/repos/treasure-data/perfectqueue/assignees{/user}","branches_url":"https://api.github.com/repos/treasure-data/perfectqueue/branches{/branch}","tags_url":"https://api.github.com/repos/treasure-data/perfectqueue/tags","blobs_url":"https://api.github.com/repos/treasure-data/perfectqueue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/treasure-data/perfectqueue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/treasure-data/perfectqueue/git/refs{/sha}","trees_url":"https://api.github.com/repos/treasure-data/perfectqueue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/treasure-data/perfectqueue/statuses/{sha}","languages_url":"https://api.github.com/repos/treasure-data/perfectqueue/languages","stargazers_url":"https://api.github.com/repos/treasure-data/perfectqueue/stargazers","contributors_url":"https://api.github.com/repos/treasure-data/perfectqueue/contributors","subscribers_url":"https://api.github.com/repos/treasure-data/perfectqueue/subscribers","subscription_url":"https://api.github.com/repos/treasure-data/perfectqueue/subscription","commits_url":"https://api.github.com/repos/treasure-data/perfectqueue/commits{/sha}","git_commits_url":"https://api.github.com/repos/treasure-data/perfectqueue/git/commits{/sha}","comments_url":"https://api.github.com/repos/treasure-data/perfectqueue/comments{/number}","issue_comment_url":"https://api.github.com/repos/treasure-data/perfectqueue/issues/comments{/number}","contents_url":"https://api.github.com/repos/treasure-data/perfectqueue/contents/{+path}","compare_url":"https://api.github.com/repos/treasure-data/perfectqueue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/treasure-data/perfectqueue/merges","archive_url":"https://api.github.com/repos/treasure-data/perfectqueue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/treasure-data/perfectqueue/downloads","issues_url":"https://api.github.com/repos/treasure-data/perfectqueue/issues{/number}","pulls_url":"https://api.github.com/repos/treasure-data/perfectqueue/pulls{/number}","milestones_url":"https://api.github.com/repos/treasure-data/perfectqueue/milestones{/number}","notifications_url":"https://api.github.com/repos/treasure-data/perfectqueue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/treasure-data/perfectqueue/labels{/name}","releases_url":"https://api.github.com/repos/treasure-data/perfectqueue/releases{/id}","deployments_url":"https://api.github.com/repos/treasure-data/perfectqueue/deployments","created_at":"2011-08-23T14:27:29Z","updated_at":"2016-07-26T06:05:30Z","pushed_at":"2016-07-26T09:02:18Z","git_url":"git://github.com/treasure-data/perfectqueue.git","ssh_url":"git@github.com:treasure-data/perfectqueue.git","clone_url":"https://github.com/treasure-data/perfectqueue.git","svn_url":"https://github.com/treasure-data/perfectqueue","homepage":"","size":363,"stargazers_count":84,"watchers_count":84,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":84,"default_branch":"master"}},"base":{"label":"treasure-data:master","ref":"master","sha":"c95523b6e014545fc54fc215d0b031db64ea71ac","user":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"repo":{"id":2255601,"name":"perfectqueue","full_name":"treasure-data/perfectqueue","owner":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/treasure-data/perfectqueue","description":"Highly available distributed queue built on RDBMS","fork":false,"url":"https://api.github.com/repos/treasure-data/perfectqueue","forks_url":"https://api.github.com/repos/treasure-data/perfectqueue/forks","keys_url":"https://api.github.com/repos/treasure-data/perfectqueue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/treasure-data/perfectqueue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/treasure-data/perfectqueue/teams","hooks_url":"https://api.github.com/repos/treasure-data/perfectqueue/hooks","issue_events_url":"https://api.github.com/repos/treasure-data/perfectqueue/issues/events{/number}","events_url":"https://api.github.com/repos/treasure-data/perfectqueue/events","assignees_url":"https://api.github.com/repos/treasure-data/perfectqueue/assignees{/user}","branches_url":"https://api.github.com/repos/treasure-data/perfectqueue/branches{/branch}","tags_url":"https://api.github.com/repos/treasure-data/perfectqueue/tags","blobs_url":"https://api.github.com/repos/treasure-data/perfectqueue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/treasure-data/perfectqueue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/treasure-data/perfectqueue/git/refs{/sha}","trees_url":"https://api.github.com/repos/treasure-data/perfectqueue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/treasure-data/perfectqueue/statuses/{sha}","languages_url":"https://api.github.com/repos/treasure-data/perfectqueue/languages","stargazers_url":"https://api.github.com/repos/treasure-data/perfectqueue/stargazers","contributors_url":"https://api.github.com/repos/treasure-data/perfectqueue/contributors","subscribers_url":"https://api.github.com/repos/treasure-data/perfectqueue/subscribers","subscription_url":"https://api.github.com/repos/treasure-data/perfectqueue/subscription","commits_url":"https://api.github.com/repos/treasure-data/perfectqueue/commits{/sha}","git_commits_url":"https://api.github.com/repos/treasure-data/perfectqueue/git/commits{/sha}","comments_url":"https://api.github.com/repos/treasure-data/perfectqueue/comments{/number}","issue_comment_url":"https://api.github.com/repos/treasure-data/perfectqueue/issues/comments{/number}","contents_url":"https://api.github.com/repos/treasure-data/perfectqueue/contents/{+path}","compare_url":"https://api.github.com/repos/treasure-data/perfectqueue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/treasure-data/perfectqueue/merges","archive_url":"https://api.github.com/repos/treasure-data/perfectqueue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/treasure-data/perfectqueue/downloads","issues_url":"https://api.github.com/repos/treasure-data/perfectqueue/issues{/number}","pulls_url":"https://api.github.com/repos/treasure-data/perfectqueue/pulls{/number}","milestones_url":"https://api.github.com/repos/treasure-data/perfectqueue/milestones{/number}","notifications_url":"https://api.github.com/repos/treasure-data/perfectqueue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/treasure-data/perfectqueue/labels{/name}","releases_url":"https://api.github.com/repos/treasure-data/perfectqueue/releases{/id}","deployments_url":"https://api.github.com/repos/treasure-data/perfectqueue/deployments","created_at":"2011-08-23T14:27:29Z","updated_at":"2016-07-26T06:05:30Z","pushed_at":"2016-07-26T09:02:18Z","git_url":"git://github.com/treasure-data/perfectqueue.git","ssh_url":"git@github.com:treasure-data/perfectqueue.git","clone_url":"https://github.com/treasure-data/perfectqueue.git","svn_url":"https://github.com/treasure-data/perfectqueue","homepage":"","size":363,"stargazers_count":84,"watchers_count":84,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":84,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/45"},"html":{"href":"https://github.com/treasure-data/perfectqueue/pull/45"},"issue":{"href":"https://api.github.com/repos/treasure-data/perfectqueue/issues/45"},"comments":{"href":"https://api.github.com/repos/treasure-data/perfectqueue/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/treasure-data/perfectqueue/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/treasure-data/perfectqueue/statuses/be4dec3ae44c59f9e699b6947b62d969fb359b5a"}}}}
{"actor":{"display_login":"kamipo"}}