GitHub PullRequestReviewCommentEvent at 2014-06-09 10:53:27
Repository: ProtectedPlanet-ESRI
Actor: adammulligan
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/comments/13535817","id":13535817,"diff_hunk":"@@ -0,0 +1,57 @@\n+import arcpy, sys\n+from arcpy import env\n+import os, sys, time, datetime, traceback, string, logging\n+\n+class RegenerateTiles:\n+\n+\n+    def __init__(self,data_directory,connectionFile,server,serviceName):\n+        self.log_file = os.path.join('d:/', 'data','import_logs','tiles_log.txt')\n+        logging.basicConfig(filename=self.log_file,level=logging.DEBUG)\n+        inputService = connectionFile + \"\\\\\" + server + \"\\\\\" + serviceName\n+        scales = \"\"\n+        numOfCachingService = 2\n+        updateMode = \"RECREATE_ALL_TILES\"\n+        areaOfInterest = \"\"\n+        waitForJobCompletion = \"WAIT\"\n+        updateExtents = \"\"\n+        env.workspace = data_directory\n+        successfully_generated = self.manage_mapserver(serviceName,\n+                                                       inputService,\n+                                                       scales,\n+                                                       updateMode,\n+                                                       numOfCachingService,\n+                                                       areaOfInterest,\n+                                                       updateExtents,\n+                                                       waitForJobCompletion)\n+        print 'Tiles Updated Successfully' if successfully_generated \\\n+        else 'Tiles Not Updated'\n+\n+\n+    def manage_mapserver(self,\n+                         serviceName, inputService,\n+                         scales, updateMode,numOfCachingService,\n+                         areaOfInterest, updateExtents, waitForJobCompletion):\n+\n+        try:\n+            starttime = time.clock()\n+            result = arcpy.ManageMapServerCacheTiles_server(inputService,\n+                                                            scales,\n+                                                            updateMode,\n+                                                            numOfCachingService,\n+                                                            areaOfInterest,\n+                                                            updateExtents,\n+                                                            waitForJobCompletion\n+                                                            )\n+            finishtime = time.clock()\n+            elapsedtime= finishtime - starttime\n+            while result.status < 4:\n+                time.sleep(0.2)\n+            resultValue = result.getMessages()","path":"src/regenerate_tiles.py","position":50,"original_position":50,"commit_id":"0ce4c461e21c7a936358b80326b218ab3e0f7a66","original_commit_id":"0ce4c461e21c7a936358b80326b218ab3e0f7a66","user":{"login":"adammulligan","id":182921,"avatar_url":"https://avatars.githubusercontent.com/u/182921?","gravatar_id":"f932948dfbe5e9bd1066f1890475124d","url":"https://api.github.com/users/adammulligan","html_url":"https://github.com/adammulligan","followers_url":"https://api.github.com/users/adammulligan/followers","following_url":"https://api.github.com/users/adammulligan/following{/other_user}","gists_url":"https://api.github.com/users/adammulligan/gists{/gist_id}","starred_url":"https://api.github.com/users/adammulligan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adammulligan/subscriptions","organizations_url":"https://api.github.com/users/adammulligan/orgs","repos_url":"https://api.github.com/users/adammulligan/repos","events_url":"https://api.github.com/users/adammulligan/events{/privacy}","received_events_url":"https://api.github.com/users/adammulligan/received_events","type":"User","site_admin":false},"body":"Where is this used?","created_at":"2014-06-09T10:53:27Z","updated_at":"2014-06-09T10:53:27Z","html_url":"https://github.com/unepwcmc/ProtectedPlanet-ESRI/pull/4#discussion_r13535817","pull_request_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/comments/13535817"},"html":{"href":"https://github.com/unepwcmc/ProtectedPlanet-ESRI/pull/4#discussion_r13535817"},"pull_request":{"href":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/4","id":16878141,"html_url":"https://github.com/unepwcmc/ProtectedPlanet-ESRI/pull/4","diff_url":"https://github.com/unepwcmc/ProtectedPlanet-ESRI/pull/4.diff","patch_url":"https://github.com/unepwcmc/ProtectedPlanet-ESRI/pull/4.patch","issue_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/issues/4","number":4,"state":"open","title":"Everything running","user":{"login":"migtorres","id":2271069,"avatar_url":"https://avatars.githubusercontent.com/u/2271069?","gravatar_id":"895fff06d0cd9d24c034745e40525dc6","url":"https://api.github.com/users/migtorres","html_url":"https://github.com/migtorres","followers_url":"https://api.github.com/users/migtorres/followers","following_url":"https://api.github.com/users/migtorres/following{/other_user}","gists_url":"https://api.github.com/users/migtorres/gists{/gist_id}","starred_url":"https://api.github.com/users/migtorres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/migtorres/subscriptions","organizations_url":"https://api.github.com/users/migtorres/orgs","repos_url":"https://api.github.com/users/migtorres/repos","events_url":"https://api.github.com/users/migtorres/events{/privacy}","received_events_url":"https://api.github.com/users/migtorres/received_events","type":"User","site_admin":false},"body":"This pull request add the python file that runs all the process to update monthly the WDPA.\r\n\r\nYou just need to run monthy_update.py to do that.\r\n\r\nAll classes now have parameters that are stored as variables in the above file. I f you need to change passwords/directories/buckets please change them on monthly_update.py.\r\n\r\nReadme file was updated to explain the whole process and how to set up the server\r\n","created_at":"2014-06-09T09:53:38Z","updated_at":"2014-06-09T10:53:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"adammulligan","id":182921,"avatar_url":"https://avatars.githubusercontent.com/u/182921?","gravatar_id":"f932948dfbe5e9bd1066f1890475124d","url":"https://api.github.com/users/adammulligan","html_url":"https://github.com/adammulligan","followers_url":"https://api.github.com/users/adammulligan/followers","following_url":"https://api.github.com/users/adammulligan/following{/other_user}","gists_url":"https://api.github.com/users/adammulligan/gists{/gist_id}","starred_url":"https://api.github.com/users/adammulligan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adammulligan/subscriptions","organizations_url":"https://api.github.com/users/adammulligan/orgs","repos_url":"https://api.github.com/users/adammulligan/repos","events_url":"https://api.github.com/users/adammulligan/events{/privacy}","received_events_url":"https://api.github.com/users/adammulligan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/4/commits","review_comments_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/4/comments","review_comment_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/comments/{number}","comments_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/issues/4/comments","statuses_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/statuses/0ce4c461e21c7a936358b80326b218ab3e0f7a66","head":{"label":"unepwcmc:run_full_app","ref":"run_full_app","sha":"0ce4c461e21c7a936358b80326b218ab3e0f7a66","user":{"login":"unepwcmc","id":513080,"avatar_url":"https://avatars.githubusercontent.com/u/513080?","gravatar_id":"a47be9c88b080e6480c4c3c717b129b8","url":"https://api.github.com/users/unepwcmc","html_url":"https://github.com/unepwcmc","followers_url":"https://api.github.com/users/unepwcmc/followers","following_url":"https://api.github.com/users/unepwcmc/following{/other_user}","gists_url":"https://api.github.com/users/unepwcmc/gists{/gist_id}","starred_url":"https://api.github.com/users/unepwcmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unepwcmc/subscriptions","organizations_url":"https://api.github.com/users/unepwcmc/orgs","repos_url":"https://api.github.com/users/unepwcmc/repos","events_url":"https://api.github.com/users/unepwcmc/events{/privacy}","received_events_url":"https://api.github.com/users/unepwcmc/received_events","type":"Organization","site_admin":false},"repo":{"id":19980588,"name":"ProtectedPlanet-ESRI","full_name":"unepwcmc/ProtectedPlanet-ESRI","owner":{"login":"unepwcmc","id":513080,"avatar_url":"https://avatars.githubusercontent.com/u/513080?","gravatar_id":"a47be9c88b080e6480c4c3c717b129b8","url":"https://api.github.com/users/unepwcmc","html_url":"https://github.com/unepwcmc","followers_url":"https://api.github.com/users/unepwcmc/followers","following_url":"https://api.github.com/users/unepwcmc/following{/other_user}","gists_url":"https://api.github.com/users/unepwcmc/gists{/gist_id}","starred_url":"https://api.github.com/users/unepwcmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unepwcmc/subscriptions","organizations_url":"https://api.github.com/users/unepwcmc/orgs","repos_url":"https://api.github.com/users/unepwcmc/repos","events_url":"https://api.github.com/users/unepwcmc/events{/privacy}","received_events_url":"https://api.github.com/users/unepwcmc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unepwcmc/ProtectedPlanet-ESRI","description":"","fork":false,"url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI","forks_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/forks","keys_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/teams","hooks_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/hooks","issue_events_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/issues/events{/number}","events_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/events","assignees_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/assignees{/user}","branches_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/branches{/branch}","tags_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/tags","blobs_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/git/refs{/sha}","trees_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/statuses/{sha}","languages_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/languages","stargazers_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/stargazers","contributors_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/contributors","subscribers_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/subscribers","subscription_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/subscription","commits_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/commits{/sha}","git_commits_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/git/commits{/sha}","comments_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/comments{/number}","issue_comment_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/issues/comments/{number}","contents_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/contents/{+path}","compare_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/merges","archive_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/downloads","issues_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/issues{/number}","pulls_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls{/number}","milestones_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/milestones{/number}","notifications_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/labels{/name}","releases_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/releases{/id}","created_at":"2014-05-20T12:50:28Z","updated_at":"2014-06-09T09:53:38Z","pushed_at":"2014-06-09T09:46:38Z","git_url":"git://github.com/unepwcmc/ProtectedPlanet-ESRI.git","ssh_url":"git@github.com:unepwcmc/ProtectedPlanet-ESRI.git","clone_url":"https://github.com/unepwcmc/ProtectedPlanet-ESRI.git","svn_url":"https://github.com/unepwcmc/ProtectedPlanet-ESRI","homepage":null,"size":356,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"unepwcmc:master","ref":"master","sha":"9fa9b3c7f8eebd78d759c226902d87f855fdcaf2","user":{"login":"unepwcmc","id":513080,"avatar_url":"https://avatars.githubusercontent.com/u/513080?","gravatar_id":"a47be9c88b080e6480c4c3c717b129b8","url":"https://api.github.com/users/unepwcmc","html_url":"https://github.com/unepwcmc","followers_url":"https://api.github.com/users/unepwcmc/followers","following_url":"https://api.github.com/users/unepwcmc/following{/other_user}","gists_url":"https://api.github.com/users/unepwcmc/gists{/gist_id}","starred_url":"https://api.github.com/users/unepwcmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unepwcmc/subscriptions","organizations_url":"https://api.github.com/users/unepwcmc/orgs","repos_url":"https://api.github.com/users/unepwcmc/repos","events_url":"https://api.github.com/users/unepwcmc/events{/privacy}","received_events_url":"https://api.github.com/users/unepwcmc/received_events","type":"Organization","site_admin":false},"repo":{"id":19980588,"name":"ProtectedPlanet-ESRI","full_name":"unepwcmc/ProtectedPlanet-ESRI","owner":{"login":"unepwcmc","id":513080,"avatar_url":"https://avatars.githubusercontent.com/u/513080?","gravatar_id":"a47be9c88b080e6480c4c3c717b129b8","url":"https://api.github.com/users/unepwcmc","html_url":"https://github.com/unepwcmc","followers_url":"https://api.github.com/users/unepwcmc/followers","following_url":"https://api.github.com/users/unepwcmc/following{/other_user}","gists_url":"https://api.github.com/users/unepwcmc/gists{/gist_id}","starred_url":"https://api.github.com/users/unepwcmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unepwcmc/subscriptions","organizations_url":"https://api.github.com/users/unepwcmc/orgs","repos_url":"https://api.github.com/users/unepwcmc/repos","events_url":"https://api.github.com/users/unepwcmc/events{/privacy}","received_events_url":"https://api.github.com/users/unepwcmc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unepwcmc/ProtectedPlanet-ESRI","description":"","fork":false,"url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI","forks_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/forks","keys_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/teams","hooks_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/hooks","issue_events_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/issues/events{/number}","events_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/events","assignees_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/assignees{/user}","branches_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/branches{/branch}","tags_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/tags","blobs_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/git/refs{/sha}","trees_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/statuses/{sha}","languages_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/languages","stargazers_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/stargazers","contributors_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/contributors","subscribers_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/subscribers","subscription_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/subscription","commits_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/commits{/sha}","git_commits_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/git/commits{/sha}","comments_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/comments{/number}","issue_comment_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/issues/comments/{number}","contents_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/contents/{+path}","compare_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/merges","archive_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/downloads","issues_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/issues{/number}","pulls_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls{/number}","milestones_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/milestones{/number}","notifications_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/labels{/name}","releases_url":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/releases{/id}","created_at":"2014-05-20T12:50:28Z","updated_at":"2014-06-09T09:53:38Z","pushed_at":"2014-06-09T09:46:38Z","git_url":"git://github.com/unepwcmc/ProtectedPlanet-ESRI.git","ssh_url":"git@github.com:unepwcmc/ProtectedPlanet-ESRI.git","clone_url":"https://github.com/unepwcmc/ProtectedPlanet-ESRI.git","svn_url":"https://github.com/unepwcmc/ProtectedPlanet-ESRI","homepage":null,"size":356,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/4"},"html":{"href":"https://github.com/unepwcmc/ProtectedPlanet-ESRI/pull/4"},"issue":{"href":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/issues/4"},"comments":{"href":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/unepwcmc/ProtectedPlanet-ESRI/statuses/0ce4c461e21c7a936358b80326b218ab3e0f7a66"}}}}