GitHub PullRequestReviewCommentEvent at 2014-12-08 11:03:42
Repository: really
Actor: AhmedSoliman
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/reallylabs/really/pulls/comments/21446292","id":21446292,"diff_hunk":"@@ -3,6 +3,54 @@\n  */\n package io.really\n \n-import akka.actor.{ Actor, ActorLogging }\n+import java.util.concurrent.ThreadLocalRandom\n+import scala.util.Random\n+import akka.actor.{ Actor, ActorLogging, ActorRef }\n+import play.api.libs.json.JsObject\n \n-abstract class Receptionist(global: ReallyGlobals) extends Actor with ActorLogging\n\\ No newline at end of file\n+/**\n+ * Receives a [[Request]] instance and a requester [[akka.actor.ActorRef]] and instantiates a RequestActor\n+ * that serves this request and dies upon finalising the request\n+ *\n+ * The Receptionist is a single actor per machine and is restarted on death (based on default\n+ * supervision strategy)\n+ *\n+ */\n+class Receptionist(global: ReallyGlobals) extends Actor with ActorLogging {\n+  import Receptionist._\n+\n+  def currentTime = System.currentTimeMillis\n+  val epoch = currentTime\n+\n+  def duration = currentTime - epoch\n+  var messagesCount = BigInt(0)\n+\n+  def frequency = BigDecimal(messagesCount) / BigDecimal(duration)\n+\n+  def random = new Random(ThreadLocalRandom.current)","path":"really-core/src/main/scala/io/really/Receptionist.scala","position":31,"original_position":31,"commit_id":"58a6412d575390e096a1ad8af0e09de360814daf","original_commit_id":"58a6412d575390e096a1ad8af0e09de360814daf","user":{"login":"AhmedSoliman","id":59670,"avatar_url":"https://avatars.githubusercontent.com/u/59670?v=3","gravatar_id":"","url":"https://api.github.com/users/AhmedSoliman","html_url":"https://github.com/AhmedSoliman","followers_url":"https://api.github.com/users/AhmedSoliman/followers","following_url":"https://api.github.com/users/AhmedSoliman/following{/other_user}","gists_url":"https://api.github.com/users/AhmedSoliman/gists{/gist_id}","starred_url":"https://api.github.com/users/AhmedSoliman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AhmedSoliman/subscriptions","organizations_url":"https://api.github.com/users/AhmedSoliman/orgs","repos_url":"https://api.github.com/users/AhmedSoliman/repos","events_url":"https://api.github.com/users/AhmedSoliman/events{/privacy}","received_events_url":"https://api.github.com/users/AhmedSoliman/received_events","type":"User","site_admin":false},"body":"this should be `val` or `lazy val`","created_at":"2014-12-08T11:03:42Z","updated_at":"2014-12-08T11:03:42Z","html_url":"https://github.com/reallylabs/really/pull/2#discussion_r21446292","pull_request_url":"https://api.github.com/repos/reallylabs/really/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/reallylabs/really/pulls/comments/21446292"},"html":{"href":"https://github.com/reallylabs/really/pull/2#discussion_r21446292"},"pull_request":{"href":"https://api.github.com/repos/reallylabs/really/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/reallylabs/really/pulls/2","id":25655624,"html_url":"https://github.com/reallylabs/really/pull/2","diff_url":"https://github.com/reallylabs/really/pull/2.diff","patch_url":"https://github.com/reallylabs/really/pull/2.patch","issue_url":"https://api.github.com/repos/reallylabs/really/issues/2","number":2,"state":"open","locked":false,"title":"feat(really-core): Implements Receptionist Actor","user":{"login":"tabdulradi","id":725206,"avatar_url":"https://avatars.githubusercontent.com/u/725206?v=3","gravatar_id":"","url":"https://api.github.com/users/tabdulradi","html_url":"https://github.com/tabdulradi","followers_url":"https://api.github.com/users/tabdulradi/followers","following_url":"https://api.github.com/users/tabdulradi/following{/other_user}","gists_url":"https://api.github.com/users/tabdulradi/gists{/gist_id}","starred_url":"https://api.github.com/users/tabdulradi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabdulradi/subscriptions","organizations_url":"https://api.github.com/users/tabdulradi/orgs","repos_url":"https://api.github.com/users/tabdulradi/repos","events_url":"https://api.github.com/users/tabdulradi/events{/privacy}","received_events_url":"https://api.github.com/users/tabdulradi/received_events","type":"User","site_admin":false},"body":"- Creates RequestDelegate (per request) for every request sent from\r\n  WebsocketHandler\r\n- handles Accounting (no. of requests and the frequency of requests)\r\n- Adds stubs for RequestDelegate\r\n- Adds Test Utililty Actor","created_at":"2014-12-08T10:00:54Z","updated_at":"2014-12-08T11:03:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a92e68fe4ce7f00403e70b984f437527b8a5b352","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/reallylabs/really/pulls/2/commits","review_comments_url":"https://api.github.com/repos/reallylabs/really/pulls/2/comments","review_comment_url":"https://api.github.com/repos/reallylabs/really/pulls/comments/{number}","comments_url":"https://api.github.com/repos/reallylabs/really/issues/2/comments","statuses_url":"https://api.github.com/repos/reallylabs/really/statuses/58a6412d575390e096a1ad8af0e09de360814daf","head":{"label":"tabdulradi:feat-receptionist","ref":"feat-receptionist","sha":"58a6412d575390e096a1ad8af0e09de360814daf","user":{"login":"tabdulradi","id":725206,"avatar_url":"https://avatars.githubusercontent.com/u/725206?v=3","gravatar_id":"","url":"https://api.github.com/users/tabdulradi","html_url":"https://github.com/tabdulradi","followers_url":"https://api.github.com/users/tabdulradi/followers","following_url":"https://api.github.com/users/tabdulradi/following{/other_user}","gists_url":"https://api.github.com/users/tabdulradi/gists{/gist_id}","starred_url":"https://api.github.com/users/tabdulradi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabdulradi/subscriptions","organizations_url":"https://api.github.com/users/tabdulradi/orgs","repos_url":"https://api.github.com/users/tabdulradi/repos","events_url":"https://api.github.com/users/tabdulradi/events{/privacy}","received_events_url":"https://api.github.com/users/tabdulradi/received_events","type":"User","site_admin":false},"repo":{"id":27662922,"name":"really","full_name":"tabdulradi/really","owner":{"login":"tabdulradi","id":725206,"avatar_url":"https://avatars.githubusercontent.com/u/725206?v=3","gravatar_id":"","url":"https://api.github.com/users/tabdulradi","html_url":"https://github.com/tabdulradi","followers_url":"https://api.github.com/users/tabdulradi/followers","following_url":"https://api.github.com/users/tabdulradi/following{/other_user}","gists_url":"https://api.github.com/users/tabdulradi/gists{/gist_id}","starred_url":"https://api.github.com/users/tabdulradi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabdulradi/subscriptions","organizations_url":"https://api.github.com/users/tabdulradi/orgs","repos_url":"https://api.github.com/users/tabdulradi/repos","events_url":"https://api.github.com/users/tabdulradi/events{/privacy}","received_events_url":"https://api.github.com/users/tabdulradi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tabdulradi/really","description":"Something awesome is coming out soon.","fork":true,"url":"https://api.github.com/repos/tabdulradi/really","forks_url":"https://api.github.com/repos/tabdulradi/really/forks","keys_url":"https://api.github.com/repos/tabdulradi/really/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tabdulradi/really/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tabdulradi/really/teams","hooks_url":"https://api.github.com/repos/tabdulradi/really/hooks","issue_events_url":"https://api.github.com/repos/tabdulradi/really/issues/events{/number}","events_url":"https://api.github.com/repos/tabdulradi/really/events","assignees_url":"https://api.github.com/repos/tabdulradi/really/assignees{/user}","branches_url":"https://api.github.com/repos/tabdulradi/really/branches{/branch}","tags_url":"https://api.github.com/repos/tabdulradi/really/tags","blobs_url":"https://api.github.com/repos/tabdulradi/really/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tabdulradi/really/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tabdulradi/really/git/refs{/sha}","trees_url":"https://api.github.com/repos/tabdulradi/really/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tabdulradi/really/statuses/{sha}","languages_url":"https://api.github.com/repos/tabdulradi/really/languages","stargazers_url":"https://api.github.com/repos/tabdulradi/really/stargazers","contributors_url":"https://api.github.com/repos/tabdulradi/really/contributors","subscribers_url":"https://api.github.com/repos/tabdulradi/really/subscribers","subscription_url":"https://api.github.com/repos/tabdulradi/really/subscription","commits_url":"https://api.github.com/repos/tabdulradi/really/commits{/sha}","git_commits_url":"https://api.github.com/repos/tabdulradi/really/git/commits{/sha}","comments_url":"https://api.github.com/repos/tabdulradi/really/comments{/number}","issue_comment_url":"https://api.github.com/repos/tabdulradi/really/issues/comments/{number}","contents_url":"https://api.github.com/repos/tabdulradi/really/contents/{+path}","compare_url":"https://api.github.com/repos/tabdulradi/really/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tabdulradi/really/merges","archive_url":"https://api.github.com/repos/tabdulradi/really/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tabdulradi/really/downloads","issues_url":"https://api.github.com/repos/tabdulradi/really/issues{/number}","pulls_url":"https://api.github.com/repos/tabdulradi/really/pulls{/number}","milestones_url":"https://api.github.com/repos/tabdulradi/really/milestones{/number}","notifications_url":"https://api.github.com/repos/tabdulradi/really/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tabdulradi/really/labels{/name}","releases_url":"https://api.github.com/repos/tabdulradi/really/releases{/id}","created_at":"2014-12-07T07:38:13Z","updated_at":"2014-12-07T07:38:15Z","pushed_at":"2014-12-08T10:31:03Z","git_url":"git://github.com/tabdulradi/really.git","ssh_url":"git@github.com:tabdulradi/really.git","clone_url":"https://github.com/tabdulradi/really.git","svn_url":"https://github.com/tabdulradi/really","homepage":null,"size":1274,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"reallylabs:master","ref":"master","sha":"fdb2270a54b29d669ff36a30f8fae19d19c00eb7","user":{"login":"reallylabs","id":8981529,"avatar_url":"https://avatars.githubusercontent.com/u/8981529?v=3","gravatar_id":"","url":"https://api.github.com/users/reallylabs","html_url":"https://github.com/reallylabs","followers_url":"https://api.github.com/users/reallylabs/followers","following_url":"https://api.github.com/users/reallylabs/following{/other_user}","gists_url":"https://api.github.com/users/reallylabs/gists{/gist_id}","starred_url":"https://api.github.com/users/reallylabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reallylabs/subscriptions","organizations_url":"https://api.github.com/users/reallylabs/orgs","repos_url":"https://api.github.com/users/reallylabs/repos","events_url":"https://api.github.com/users/reallylabs/events{/privacy}","received_events_url":"https://api.github.com/users/reallylabs/received_events","type":"Organization","site_admin":false},"repo":{"id":24669796,"name":"really","full_name":"reallylabs/really","owner":{"login":"reallylabs","id":8981529,"avatar_url":"https://avatars.githubusercontent.com/u/8981529?v=3","gravatar_id":"","url":"https://api.github.com/users/reallylabs","html_url":"https://github.com/reallylabs","followers_url":"https://api.github.com/users/reallylabs/followers","following_url":"https://api.github.com/users/reallylabs/following{/other_user}","gists_url":"https://api.github.com/users/reallylabs/gists{/gist_id}","starred_url":"https://api.github.com/users/reallylabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reallylabs/subscriptions","organizations_url":"https://api.github.com/users/reallylabs/orgs","repos_url":"https://api.github.com/users/reallylabs/repos","events_url":"https://api.github.com/users/reallylabs/events{/privacy}","received_events_url":"https://api.github.com/users/reallylabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reallylabs/really","description":"Something awesome is coming out soon.","fork":false,"url":"https://api.github.com/repos/reallylabs/really","forks_url":"https://api.github.com/repos/reallylabs/really/forks","keys_url":"https://api.github.com/repos/reallylabs/really/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reallylabs/really/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reallylabs/really/teams","hooks_url":"https://api.github.com/repos/reallylabs/really/hooks","issue_events_url":"https://api.github.com/repos/reallylabs/really/issues/events{/number}","events_url":"https://api.github.com/repos/reallylabs/really/events","assignees_url":"https://api.github.com/repos/reallylabs/really/assignees{/user}","branches_url":"https://api.github.com/repos/reallylabs/really/branches{/branch}","tags_url":"https://api.github.com/repos/reallylabs/really/tags","blobs_url":"https://api.github.com/repos/reallylabs/really/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reallylabs/really/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reallylabs/really/git/refs{/sha}","trees_url":"https://api.github.com/repos/reallylabs/really/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reallylabs/really/statuses/{sha}","languages_url":"https://api.github.com/repos/reallylabs/really/languages","stargazers_url":"https://api.github.com/repos/reallylabs/really/stargazers","contributors_url":"https://api.github.com/repos/reallylabs/really/contributors","subscribers_url":"https://api.github.com/repos/reallylabs/really/subscribers","subscription_url":"https://api.github.com/repos/reallylabs/really/subscription","commits_url":"https://api.github.com/repos/reallylabs/really/commits{/sha}","git_commits_url":"https://api.github.com/repos/reallylabs/really/git/commits{/sha}","comments_url":"https://api.github.com/repos/reallylabs/really/comments{/number}","issue_comment_url":"https://api.github.com/repos/reallylabs/really/issues/comments/{number}","contents_url":"https://api.github.com/repos/reallylabs/really/contents/{+path}","compare_url":"https://api.github.com/repos/reallylabs/really/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reallylabs/really/merges","archive_url":"https://api.github.com/repos/reallylabs/really/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reallylabs/really/downloads","issues_url":"https://api.github.com/repos/reallylabs/really/issues{/number}","pulls_url":"https://api.github.com/repos/reallylabs/really/pulls{/number}","milestones_url":"https://api.github.com/repos/reallylabs/really/milestones{/number}","notifications_url":"https://api.github.com/repos/reallylabs/really/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reallylabs/really/labels{/name}","releases_url":"https://api.github.com/repos/reallylabs/really/releases{/id}","created_at":"2014-10-01T07:40:43Z","updated_at":"2014-12-08T09:16:09Z","pushed_at":"2014-12-08T09:16:09Z","git_url":"git://github.com/reallylabs/really.git","ssh_url":"git@github.com:reallylabs/really.git","clone_url":"https://github.com/reallylabs/really.git","svn_url":"https://github.com/reallylabs/really","homepage":null,"size":1274,"stargazers_count":16,"watchers_count":16,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reallylabs/really/pulls/2"},"html":{"href":"https://github.com/reallylabs/really/pull/2"},"issue":{"href":"https://api.github.com/repos/reallylabs/really/issues/2"},"comments":{"href":"https://api.github.com/repos/reallylabs/really/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/reallylabs/really/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/reallylabs/really/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/reallylabs/really/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/reallylabs/really/statuses/58a6412d575390e096a1ad8af0e09de360814daf"}}}}