{"action":"created","comment":{"url":"https://api.github.com/repos/sot/jobwatch/pulls/comments/35487357","id":35487357,"diff_hunk":"@@ -15,6 +15,50 @@\n \n \n # Ska-specific watchers\n+class SkaURLWatch(JobWatch):\n+    def __init__(self, task, maxage_hours, url=None,):\n+        self.type = 'URL'\n+        self.basename = url\n+        super(SkaURLWatch, self).__init__(task, url, maxage=maxage_hours * HOURS)\n+\n+    @property\n+    def headers(self):\n+        if not hasattr(self, '_headers'):\n+            try:\n+                import urllib2","path":"hourly_watch.py","position":14,"original_position":14,"commit_id":"5b5844dec4d5787926a19ca0162dab7a56e9c980","original_commit_id":"5b5844dec4d5787926a19ca0162dab7a56e9c980","user":{"login":"taldcroft","id":348089,"avatar_url":"https://avatars.githubusercontent.com/u/348089?v=3","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"body":"Would this work?\r\n```\r\n        if not hasattr(self, '_headers'):\r\n            try:\r\n                response = requests.get(self.basename)\r\n            except:\r\n                self._exists = False\r\n                self._headers = None\r\n            else:\r\n                self._exists = True\r\n                self._headers = response.headers\r\n```\r\n","created_at":"2015-07-25T22:16:48Z","updated_at":"2015-07-25T22:16:48Z","html_url":"https://github.com/sot/jobwatch/pull/11#discussion_r35487357","pull_request_url":"https://api.github.com/repos/sot/jobwatch/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/sot/jobwatch/pulls/comments/35487357"},"html":{"href":"https://github.com/sot/jobwatch/pull/11#discussion_r35487357"},"pull_request":{"href":"https://api.github.com/repos/sot/jobwatch/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/sot/jobwatch/pulls/11","id":40798299,"html_url":"https://github.com/sot/jobwatch/pull/11","diff_url":"https://github.com/sot/jobwatch/pull/11.diff","patch_url":"https://github.com/sot/jobwatch/pull/11.patch","issue_url":"https://api.github.com/repos/sot/jobwatch/issues/11","number":11,"state":"open","locked":false,"title":"Check that kadi web server is responding hourly","user":{"login":"jeanconn","id":791508,"avatar_url":"https://avatars.githubusercontent.com/u/791508?v=3","gravatar_id":"","url":"https://api.github.com/users/jeanconn","html_url":"https://github.com/jeanconn","followers_url":"https://api.github.com/users/jeanconn/followers","following_url":"https://api.github.com/users/jeanconn/following{/other_user}","gists_url":"https://api.github.com/users/jeanconn/gists{/gist_id}","starred_url":"https://api.github.com/users/jeanconn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeanconn/subscriptions","organizations_url":"https://api.github.com/users/jeanconn/orgs","repos_url":"https://api.github.com/users/jeanconn/repos","events_url":"https://api.github.com/users/jeanconn/events{/privacy}","received_events_url":"https://api.github.com/users/jeanconn/received_events","type":"User","site_admin":false},"body":"Add an hourly check that http://kadi.cfa.harvard.edu loads.","created_at":"2015-07-24T17:42:26Z","updated_at":"2015-07-25T22:16:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d18b960dc1c8b9246ce5445314de7331ccbf1f1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sot/jobwatch/pulls/11/commits","review_comments_url":"https://api.github.com/repos/sot/jobwatch/pulls/11/comments","review_comment_url":"https://api.github.com/repos/sot/jobwatch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sot/jobwatch/issues/11/comments","statuses_url":"https://api.github.com/repos/sot/jobwatch/statuses/5b5844dec4d5787926a19ca0162dab7a56e9c980","head":{"label":"sot:url_watch","ref":"url_watch","sha":"5b5844dec4d5787926a19ca0162dab7a56e9c980","user":{"login":"sot","id":781587,"avatar_url":"https://avatars.githubusercontent.com/u/781587?v=3","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"repo":{"id":2821442,"name":"jobwatch","full_name":"sot/jobwatch","owner":{"login":"sot","id":781587,"avatar_url":"https://avatars.githubusercontent.com/u/781587?v=3","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sot/jobwatch","description":"Watch files, database tables, and log files to ensure valid cron processing","fork":false,"url":"https://api.github.com/repos/sot/jobwatch","forks_url":"https://api.github.com/repos/sot/jobwatch/forks","keys_url":"https://api.github.com/repos/sot/jobwatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sot/jobwatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sot/jobwatch/teams","hooks_url":"https://api.github.com/repos/sot/jobwatch/hooks","issue_events_url":"https://api.github.com/repos/sot/jobwatch/issues/events{/number}","events_url":"https://api.github.com/repos/sot/jobwatch/events","assignees_url":"https://api.github.com/repos/sot/jobwatch/assignees{/user}","branches_url":"https://api.github.com/repos/sot/jobwatch/branches{/branch}","tags_url":"https://api.github.com/repos/sot/jobwatch/tags","blobs_url":"https://api.github.com/repos/sot/jobwatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sot/jobwatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sot/jobwatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/sot/jobwatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sot/jobwatch/statuses/{sha}","languages_url":"https://api.github.com/repos/sot/jobwatch/languages","stargazers_url":"https://api.github.com/repos/sot/jobwatch/stargazers","contributors_url":"https://api.github.com/repos/sot/jobwatch/contributors","subscribers_url":"https://api.github.com/repos/sot/jobwatch/subscribers","subscription_url":"https://api.github.com/repos/sot/jobwatch/subscription","commits_url":"https://api.github.com/repos/sot/jobwatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/sot/jobwatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/sot/jobwatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/sot/jobwatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/sot/jobwatch/contents/{+path}","compare_url":"https://api.github.com/repos/sot/jobwatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sot/jobwatch/merges","archive_url":"https://api.github.com/repos/sot/jobwatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sot/jobwatch/downloads","issues_url":"https://api.github.com/repos/sot/jobwatch/issues{/number}","pulls_url":"https://api.github.com/repos/sot/jobwatch/pulls{/number}","milestones_url":"https://api.github.com/repos/sot/jobwatch/milestones{/number}","notifications_url":"https://api.github.com/repos/sot/jobwatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sot/jobwatch/labels{/name}","releases_url":"https://api.github.com/repos/sot/jobwatch/releases{/id}","created_at":"2011-11-21T17:04:00Z","updated_at":"2015-04-07T15:33:53Z","pushed_at":"2015-07-24T17:42:27Z","git_url":"git://github.com/sot/jobwatch.git","ssh_url":"git@github.com:sot/jobwatch.git","clone_url":"https://github.com/sot/jobwatch.git","svn_url":"https://github.com/sot/jobwatch","homepage":"","size":568,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"sot:master","ref":"master","sha":"3ece123ab6eec2db5e666ba951b96cf65883d677","user":{"login":"sot","id":781587,"avatar_url":"https://avatars.githubusercontent.com/u/781587?v=3","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"repo":{"id":2821442,"name":"jobwatch","full_name":"sot/jobwatch","owner":{"login":"sot","id":781587,"avatar_url":"https://avatars.githubusercontent.com/u/781587?v=3","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sot/jobwatch","description":"Watch files, database tables, and log files to ensure valid cron processing","fork":false,"url":"https://api.github.com/repos/sot/jobwatch","forks_url":"https://api.github.com/repos/sot/jobwatch/forks","keys_url":"https://api.github.com/repos/sot/jobwatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sot/jobwatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sot/jobwatch/teams","hooks_url":"https://api.github.com/repos/sot/jobwatch/hooks","issue_events_url":"https://api.github.com/repos/sot/jobwatch/issues/events{/number}","events_url":"https://api.github.com/repos/sot/jobwatch/events","assignees_url":"https://api.github.com/repos/sot/jobwatch/assignees{/user}","branches_url":"https://api.github.com/repos/sot/jobwatch/branches{/branch}","tags_url":"https://api.github.com/repos/sot/jobwatch/tags","blobs_url":"https://api.github.com/repos/sot/jobwatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sot/jobwatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sot/jobwatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/sot/jobwatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sot/jobwatch/statuses/{sha}","languages_url":"https://api.github.com/repos/sot/jobwatch/languages","stargazers_url":"https://api.github.com/repos/sot/jobwatch/stargazers","contributors_url":"https://api.github.com/repos/sot/jobwatch/contributors","subscribers_url":"https://api.github.com/repos/sot/jobwatch/subscribers","subscription_url":"https://api.github.com/repos/sot/jobwatch/subscription","commits_url":"https://api.github.com/repos/sot/jobwatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/sot/jobwatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/sot/jobwatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/sot/jobwatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/sot/jobwatch/contents/{+path}","compare_url":"https://api.github.com/repos/sot/jobwatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sot/jobwatch/merges","archive_url":"https://api.github.com/repos/sot/jobwatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sot/jobwatch/downloads","issues_url":"https://api.github.com/repos/sot/jobwatch/issues{/number}","pulls_url":"https://api.github.com/repos/sot/jobwatch/pulls{/number}","milestones_url":"https://api.github.com/repos/sot/jobwatch/milestones{/number}","notifications_url":"https://api.github.com/repos/sot/jobwatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sot/jobwatch/labels{/name}","releases_url":"https://api.github.com/repos/sot/jobwatch/releases{/id}","created_at":"2011-11-21T17:04:00Z","updated_at":"2015-04-07T15:33:53Z","pushed_at":"2015-07-24T17:42:27Z","git_url":"git://github.com/sot/jobwatch.git","ssh_url":"git@github.com:sot/jobwatch.git","clone_url":"https://github.com/sot/jobwatch.git","svn_url":"https://github.com/sot/jobwatch","homepage":"","size":568,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sot/jobwatch/pulls/11"},"html":{"href":"https://github.com/sot/jobwatch/pull/11"},"issue":{"href":"https://api.github.com/repos/sot/jobwatch/issues/11"},"comments":{"href":"https://api.github.com/repos/sot/jobwatch/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/sot/jobwatch/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/sot/jobwatch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sot/jobwatch/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/sot/jobwatch/statuses/5b5844dec4d5787926a19ca0162dab7a56e9c980"}}}}