{"action":"created","comment":{"url":"https://api.github.com/repos/kaltura/server/pulls/comments/54410030","id":54410030,"diff_hunk":"@@ -0,0 +1,67 @@\n+<?php\n+require_once (__DIR__ . '/../../bootstrap.php');\n+\n+CONST LIMIT = 500;\n+$initialCreatedAtValue = '2000-01-01 00:00:00';\n+\n+//Script doesn't have to start at the beginning of time, just call it with the initial time you want.\n+if ($argc == 2)\n+{\n+\t$initialCreatedAtValue = $argv[1];\n+}\n+\n+$c = new Criteria();\n+$c->add(entryPeer::TYPE, entryType::LIVE_STREAM);\n+$c->addAscendingOrderByColumn(entryPeer::UPDATED_AT);\n+$c->setLimit(LIMIT);\n+\n+$updatedAtValue = $initialCreatedAtValue;\n+$liveEntries = array(1);\n+while(!empty($liveEntries))\n+{\n+\t$c->add(entryPeer::UPDATED_AT, $updatedAtValue, Criteria::GREATER_THAN);\n+\t$liveEntries = entryPeer::doSelect($c);\n+\tforeach($liveEntries as $liveEntry)\n+\t{\n+\t\t\n+\t\t/**\n+\t\t * @var LiveStreamEntry $liveEntry\n+\t\t */\n+\t\t$mediaServerIds = array();\n+\t\t$mediaServers = $liveEntry->getMediaServers();\n+\t\tif(count($mediaServers))\n+\t\t{\n+\t\t\tforeach ($mediaServers as $key => $mediaServer)\n+\t\t\t{\n+\t\t\t\t$mediaServerIds[] = $mediaServer->getMediaServerId();\n+\t\t\t\t/**\n+\t\t\t\t * @var kLiveMediaServer $mediaServer\n+\t\t\t\t */\n+\t\t\t\t$liveEntryServerNode = new LiveEntryServerNode();\n+\t\t\t\t$liveEntryServerNode->setEntryId($liveEntry->getId());\n+\t\t\t\t$liveEntryServerNode->setServerNodeId($mediaServer->getMediaServerId());\n+\t\t\t\t$liveEntryServerNode->setPartnerId($liveEntry->getPartnerId());\n+\t\t\t\t$liveEntryServerNode->setStatus($liveEntry->getLiveStatus());\n+\t\t\t\t$entryServerNodeType = EntryServerNodeType::LIVE_PRIMARY;\n+\t\t\t\tif ($mediaServer->getIndex() == 1)\n+\t\t\t\t{\n+\t\t\t\t\t$entryServerNodeType = EntryServerNodeType::LIVE_BACKUP;\n+\t\t\t\t}\n+//\t\t\t\t$liveEntryServerNode->save();","path":"deployment/updates/scripts/2016_02_17_move_live_entry_to_entry_server_node.php","position":50,"original_position":50,"commit_id":"bc4f8e9baf1427b95c93b8483fe16595831d5b12","original_commit_id":"bc4f8e9baf1427b95c93b8483fe16595831d5b12","user":{"login":"yossipapi","id":4889668,"avatar_url":"https://avatars.githubusercontent.com/u/4889668?v=3","gravatar_id":"","url":"https://api.github.com/users/yossipapi","html_url":"https://github.com/yossipapi","followers_url":"https://api.github.com/users/yossipapi/followers","following_url":"https://api.github.com/users/yossipapi/following{/other_user}","gists_url":"https://api.github.com/users/yossipapi/gists{/gist_id}","starred_url":"https://api.github.com/users/yossipapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yossipapi/subscriptions","organizations_url":"https://api.github.com/users/yossipapi/orgs","repos_url":"https://api.github.com/users/yossipapi/repos","events_url":"https://api.github.com/users/yossipapi/events{/privacy}","received_events_url":"https://api.github.com/users/yossipapi/received_events","type":"User","site_admin":false},"body":"why is this commented out?","created_at":"2016-02-29T13:41:35Z","updated_at":"2016-02-29T13:41:35Z","html_url":"https://github.com/kaltura/server/pull/3882#discussion_r54410030","pull_request_url":"https://api.github.com/repos/kaltura/server/pulls/3882","_links":{"self":{"href":"https://api.github.com/repos/kaltura/server/pulls/comments/54410030"},"html":{"href":"https://github.com/kaltura/server/pull/3882#discussion_r54410030"},"pull_request":{"href":"https://api.github.com/repos/kaltura/server/pulls/3882"}}},"pull_request":{"url":"https://api.github.com/repos/kaltura/server/pulls/3882","id":60690738,"html_url":"https://github.com/kaltura/server/pull/3882","diff_url":"https://github.com/kaltura/server/pull/3882.diff","patch_url":"https://github.com/kaltura/server/pull/3882.patch","issue_url":"https://api.github.com/repos/kaltura/server/issues/3882","number":3882,"state":"open","locked":false,"title":"Kajam 11.9.0 entry server node","user":{"login":"EladCohenKaltura","id":10695719,"avatar_url":"https://avatars.githubusercontent.com/u/10695719?v=3","gravatar_id":"","url":"https://api.github.com/users/EladCohenKaltura","html_url":"https://github.com/EladCohenKaltura","followers_url":"https://api.github.com/users/EladCohenKaltura/followers","following_url":"https://api.github.com/users/EladCohenKaltura/following{/other_user}","gists_url":"https://api.github.com/users/EladCohenKaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/EladCohenKaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EladCohenKaltura/subscriptions","organizations_url":"https://api.github.com/users/EladCohenKaltura/orgs","repos_url":"https://api.github.com/users/EladCohenKaltura/repos","events_url":"https://api.github.com/users/EladCohenKaltura/events{/privacy}","received_events_url":"https://api.github.com/users/EladCohenKaltura/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-25T14:56:34Z","updated_at":"2016-02-29T13:41:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"befeec15e5f589f6a3c4b3d653ef661aa68e0174","assignee":{"login":"yossipapi","id":4889668,"avatar_url":"https://avatars.githubusercontent.com/u/4889668?v=3","gravatar_id":"","url":"https://api.github.com/users/yossipapi","html_url":"https://github.com/yossipapi","followers_url":"https://api.github.com/users/yossipapi/followers","following_url":"https://api.github.com/users/yossipapi/following{/other_user}","gists_url":"https://api.github.com/users/yossipapi/gists{/gist_id}","starred_url":"https://api.github.com/users/yossipapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yossipapi/subscriptions","organizations_url":"https://api.github.com/users/yossipapi/orgs","repos_url":"https://api.github.com/users/yossipapi/repos","events_url":"https://api.github.com/users/yossipapi/events{/privacy}","received_events_url":"https://api.github.com/users/yossipapi/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kaltura/server/pulls/3882/commits","review_comments_url":"https://api.github.com/repos/kaltura/server/pulls/3882/comments","review_comment_url":"https://api.github.com/repos/kaltura/server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaltura/server/issues/3882/comments","statuses_url":"https://api.github.com/repos/kaltura/server/statuses/bc4f8e9baf1427b95c93b8483fe16595831d5b12","head":{"label":"kaltura:Kajam-11.9.0-EntryServerNode","ref":"Kajam-11.9.0-EntryServerNode","sha":"bc4f8e9baf1427b95c93b8483fe16595831d5b12","user":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"repo":{"id":11364783,"name":"server","full_name":"kaltura/server","owner":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaltura/server","description":"The official Kaltura server. ","fork":false,"url":"https://api.github.com/repos/kaltura/server","forks_url":"https://api.github.com/repos/kaltura/server/forks","keys_url":"https://api.github.com/repos/kaltura/server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaltura/server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaltura/server/teams","hooks_url":"https://api.github.com/repos/kaltura/server/hooks","issue_events_url":"https://api.github.com/repos/kaltura/server/issues/events{/number}","events_url":"https://api.github.com/repos/kaltura/server/events","assignees_url":"https://api.github.com/repos/kaltura/server/assignees{/user}","branches_url":"https://api.github.com/repos/kaltura/server/branches{/branch}","tags_url":"https://api.github.com/repos/kaltura/server/tags","blobs_url":"https://api.github.com/repos/kaltura/server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaltura/server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaltura/server/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaltura/server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaltura/server/statuses/{sha}","languages_url":"https://api.github.com/repos/kaltura/server/languages","stargazers_url":"https://api.github.com/repos/kaltura/server/stargazers","contributors_url":"https://api.github.com/repos/kaltura/server/contributors","subscribers_url":"https://api.github.com/repos/kaltura/server/subscribers","subscription_url":"https://api.github.com/repos/kaltura/server/subscription","commits_url":"https://api.github.com/repos/kaltura/server/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaltura/server/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaltura/server/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaltura/server/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaltura/server/contents/{+path}","compare_url":"https://api.github.com/repos/kaltura/server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaltura/server/merges","archive_url":"https://api.github.com/repos/kaltura/server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaltura/server/downloads","issues_url":"https://api.github.com/repos/kaltura/server/issues{/number}","pulls_url":"https://api.github.com/repos/kaltura/server/pulls{/number}","milestones_url":"https://api.github.com/repos/kaltura/server/milestones{/number}","notifications_url":"https://api.github.com/repos/kaltura/server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaltura/server/labels{/name}","releases_url":"https://api.github.com/repos/kaltura/server/releases{/id}","deployments_url":"https://api.github.com/repos/kaltura/server/deployments","created_at":"2013-07-12T08:59:26Z","updated_at":"2016-02-22T16:10:27Z","pushed_at":"2016-02-29T13:22:09Z","git_url":"git://github.com/kaltura/server.git","ssh_url":"git@github.com:kaltura/server.git","clone_url":"https://github.com/kaltura/server.git","svn_url":"https://github.com/kaltura/server","homepage":"http://www.kaltura.org","size":228955,"stargazers_count":80,"watchers_count":80,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":86,"mirror_url":null,"open_issues_count":69,"forks":86,"open_issues":69,"watchers":80,"default_branch":"Kajam-11.10.0"}},"base":{"label":"kaltura:Kajam-11.9.0","ref":"Kajam-11.9.0","sha":"5f1b4d09c2ca630b6fdf0ef0c4c03e3a4d2040a9","user":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"repo":{"id":11364783,"name":"server","full_name":"kaltura/server","owner":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaltura/server","description":"The official Kaltura server. ","fork":false,"url":"https://api.github.com/repos/kaltura/server","forks_url":"https://api.github.com/repos/kaltura/server/forks","keys_url":"https://api.github.com/repos/kaltura/server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaltura/server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaltura/server/teams","hooks_url":"https://api.github.com/repos/kaltura/server/hooks","issue_events_url":"https://api.github.com/repos/kaltura/server/issues/events{/number}","events_url":"https://api.github.com/repos/kaltura/server/events","assignees_url":"https://api.github.com/repos/kaltura/server/assignees{/user}","branches_url":"https://api.github.com/repos/kaltura/server/branches{/branch}","tags_url":"https://api.github.com/repos/kaltura/server/tags","blobs_url":"https://api.github.com/repos/kaltura/server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaltura/server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaltura/server/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaltura/server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaltura/server/statuses/{sha}","languages_url":"https://api.github.com/repos/kaltura/server/languages","stargazers_url":"https://api.github.com/repos/kaltura/server/stargazers","contributors_url":"https://api.github.com/repos/kaltura/server/contributors","subscribers_url":"https://api.github.com/repos/kaltura/server/subscribers","subscription_url":"https://api.github.com/repos/kaltura/server/subscription","commits_url":"https://api.github.com/repos/kaltura/server/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaltura/server/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaltura/server/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaltura/server/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaltura/server/contents/{+path}","compare_url":"https://api.github.com/repos/kaltura/server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaltura/server/merges","archive_url":"https://api.github.com/repos/kaltura/server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaltura/server/downloads","issues_url":"https://api.github.com/repos/kaltura/server/issues{/number}","pulls_url":"https://api.github.com/repos/kaltura/server/pulls{/number}","milestones_url":"https://api.github.com/repos/kaltura/server/milestones{/number}","notifications_url":"https://api.github.com/repos/kaltura/server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaltura/server/labels{/name}","releases_url":"https://api.github.com/repos/kaltura/server/releases{/id}","deployments_url":"https://api.github.com/repos/kaltura/server/deployments","created_at":"2013-07-12T08:59:26Z","updated_at":"2016-02-22T16:10:27Z","pushed_at":"2016-02-29T13:22:09Z","git_url":"git://github.com/kaltura/server.git","ssh_url":"git@github.com:kaltura/server.git","clone_url":"https://github.com/kaltura/server.git","svn_url":"https://github.com/kaltura/server","homepage":"http://www.kaltura.org","size":228955,"stargazers_count":80,"watchers_count":80,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":86,"mirror_url":null,"open_issues_count":69,"forks":86,"open_issues":69,"watchers":80,"default_branch":"Kajam-11.10.0"}},"_links":{"self":{"href":"https://api.github.com/repos/kaltura/server/pulls/3882"},"html":{"href":"https://github.com/kaltura/server/pull/3882"},"issue":{"href":"https://api.github.com/repos/kaltura/server/issues/3882"},"comments":{"href":"https://api.github.com/repos/kaltura/server/issues/3882/comments"},"review_comments":{"href":"https://api.github.com/repos/kaltura/server/pulls/3882/comments"},"review_comment":{"href":"https://api.github.com/repos/kaltura/server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaltura/server/pulls/3882/commits"},"statuses":{"href":"https://api.github.com/repos/kaltura/server/statuses/bc4f8e9baf1427b95c93b8483fe16595831d5b12"}}}}