{"action":"created","comment":{"url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments/58829796","id":58829796,"diff_hunk":"@@ -94,25 +100,51 @@ def synchronize():\n   from DIRAC.ResourceStatusSystem.Utilities      import Synchronizer\n \n   synchronizer = Synchronizer.Synchronizer()\n-  \n+\n   if switchDict[ 'element' ] in ( 'Site', 'all' ):\n     subLogger.info( 'Synchronizing Sites' )\n     res = synchronizer._syncSites()\n     if not res[ 'OK' ]:\n       return res\n-    \n+\n   if switchDict[ 'element' ] in ( 'Resource', 'all' ):\n     subLogger.info( 'Synchronizing Resource' )\n     res = synchronizer._syncResources()\n     if not res[ 'OK' ]:\n       return res\n-  \n+\n   if switchDict[ 'element' ] in ( 'Node', 'all' ):\n     subLogger.info( 'Synchronizing Nodes' )\n     res = synchronizer._syncNodes()\n     if not res[ 'OK' ]:\n       return res\n-  \n+\n+  return S_OK()\n+\n+def initSites():\n+  '''\n+    Initializes Sites statuses taking their values from the \"SiteMask\" table of \"JobDB\" database.\n+  '''\n+\n+  jobClient = JobDB()\n+  rssClient = ResourceStatusDB()\n+\n+  sites = jobClient.getAllSiteMaskStatus()\n+\n+  if not sites[ 'OK' ]:\n+    subLogger.error( sites[ 'Message' ] )","path":"ResourceStatusSystem/scripts/dirac-rss-sync.py","position":143,"original_position":138,"commit_id":"aaa71ff215f909360d50c240144480ac93e50b65","original_commit_id":"935786467d3e4bd36b2fd2d11f0410a84e7e3886","user":{"login":"vipersec","id":8127545,"avatar_url":"https://avatars.githubusercontent.com/u/8127545?v=3","gravatar_id":"","url":"https://api.github.com/users/vipersec","html_url":"https://github.com/vipersec","followers_url":"https://api.github.com/users/vipersec/followers","following_url":"https://api.github.com/users/vipersec/following{/other_user}","gists_url":"https://api.github.com/users/vipersec/gists{/gist_id}","starred_url":"https://api.github.com/users/vipersec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipersec/subscriptions","organizations_url":"https://api.github.com/users/vipersec/orgs","repos_url":"https://api.github.com/users/vipersec/repos","events_url":"https://api.github.com/users/vipersec/events{/privacy}","received_events_url":"https://api.github.com/users/vipersec/received_events","type":"User","site_admin":false},"body":"Done https://github.com/DIRACGrid/DIRAC/pull/2871/commits/30cef3b0cd61e080eff532e6cb7758943e054a6c","created_at":"2016-04-07T07:33:26Z","updated_at":"2016-04-07T07:33:26Z","html_url":"https://github.com/DIRACGrid/DIRAC/pull/2871#discussion_r58829796","pull_request_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2871","_links":{"self":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments/58829796"},"html":{"href":"https://github.com/DIRACGrid/DIRAC/pull/2871#discussion_r58829796"},"pull_request":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2871"}}},"pull_request":{"url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2871","id":65439762,"html_url":"https://github.com/DIRACGrid/DIRAC/pull/2871","diff_url":"https://github.com/DIRACGrid/DIRAC/pull/2871.diff","patch_url":"https://github.com/DIRACGrid/DIRAC/pull/2871.patch","issue_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2871","number":2871,"state":"open","locked":false,"title":" [v6r15] dirac-rss-sync is also syncing sites now","user":{"login":"vipersec","id":8127545,"avatar_url":"https://avatars.githubusercontent.com/u/8127545?v=3","gravatar_id":"","url":"https://api.github.com/users/vipersec","html_url":"https://github.com/vipersec","followers_url":"https://api.github.com/users/vipersec/followers","following_url":"https://api.github.com/users/vipersec/following{/other_user}","gists_url":"https://api.github.com/users/vipersec/gists{/gist_id}","starred_url":"https://api.github.com/users/vipersec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipersec/subscriptions","organizations_url":"https://api.github.com/users/vipersec/orgs","repos_url":"https://api.github.com/users/vipersec/repos","events_url":"https://api.github.com/users/vipersec/events{/privacy}","received_events_url":"https://api.github.com/users/vipersec/received_events","type":"User","site_admin":false},"body":"The sites that reside in `SiteMask` table of `JobDB` database are taken and inserted (with the appropriate format) to the `SiteStatus` table of `ResourceStatusDB` database.\r\n\r\nThis is invoked when: `dirac-rss-sync --init` is executed.","created_at":"2016-04-06T10:02:17Z","updated_at":"2016-04-07T07:33:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e83a5fd4ddd9e61f99b63a88aaa2e9cfb69e8ea5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2871/commits","review_comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2871/comments","review_comment_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2871/comments","statuses_url":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/aaa71ff215f909360d50c240144480ac93e50b65","head":{"label":"vipersec:rss-sync","ref":"rss-sync","sha":"aaa71ff215f909360d50c240144480ac93e50b65","user":{"login":"vipersec","id":8127545,"avatar_url":"https://avatars.githubusercontent.com/u/8127545?v=3","gravatar_id":"","url":"https://api.github.com/users/vipersec","html_url":"https://github.com/vipersec","followers_url":"https://api.github.com/users/vipersec/followers","following_url":"https://api.github.com/users/vipersec/following{/other_user}","gists_url":"https://api.github.com/users/vipersec/gists{/gist_id}","starred_url":"https://api.github.com/users/vipersec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipersec/subscriptions","organizations_url":"https://api.github.com/users/vipersec/orgs","repos_url":"https://api.github.com/users/vipersec/repos","events_url":"https://api.github.com/users/vipersec/events{/privacy}","received_events_url":"https://api.github.com/users/vipersec/received_events","type":"User","site_admin":false},"repo":{"id":51287138,"name":"DIRAC","full_name":"vipersec/DIRAC","owner":{"login":"vipersec","id":8127545,"avatar_url":"https://avatars.githubusercontent.com/u/8127545?v=3","gravatar_id":"","url":"https://api.github.com/users/vipersec","html_url":"https://github.com/vipersec","followers_url":"https://api.github.com/users/vipersec/followers","following_url":"https://api.github.com/users/vipersec/following{/other_user}","gists_url":"https://api.github.com/users/vipersec/gists{/gist_id}","starred_url":"https://api.github.com/users/vipersec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipersec/subscriptions","organizations_url":"https://api.github.com/users/vipersec/orgs","repos_url":"https://api.github.com/users/vipersec/repos","events_url":"https://api.github.com/users/vipersec/events{/privacy}","received_events_url":"https://api.github.com/users/vipersec/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vipersec/DIRAC","description":"DIRAC Grid","fork":true,"url":"https://api.github.com/repos/vipersec/DIRAC","forks_url":"https://api.github.com/repos/vipersec/DIRAC/forks","keys_url":"https://api.github.com/repos/vipersec/DIRAC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vipersec/DIRAC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vipersec/DIRAC/teams","hooks_url":"https://api.github.com/repos/vipersec/DIRAC/hooks","issue_events_url":"https://api.github.com/repos/vipersec/DIRAC/issues/events{/number}","events_url":"https://api.github.com/repos/vipersec/DIRAC/events","assignees_url":"https://api.github.com/repos/vipersec/DIRAC/assignees{/user}","branches_url":"https://api.github.com/repos/vipersec/DIRAC/branches{/branch}","tags_url":"https://api.github.com/repos/vipersec/DIRAC/tags","blobs_url":"https://api.github.com/repos/vipersec/DIRAC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vipersec/DIRAC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vipersec/DIRAC/git/refs{/sha}","trees_url":"https://api.github.com/repos/vipersec/DIRAC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vipersec/DIRAC/statuses/{sha}","languages_url":"https://api.github.com/repos/vipersec/DIRAC/languages","stargazers_url":"https://api.github.com/repos/vipersec/DIRAC/stargazers","contributors_url":"https://api.github.com/repos/vipersec/DIRAC/contributors","subscribers_url":"https://api.github.com/repos/vipersec/DIRAC/subscribers","subscription_url":"https://api.github.com/repos/vipersec/DIRAC/subscription","commits_url":"https://api.github.com/repos/vipersec/DIRAC/commits{/sha}","git_commits_url":"https://api.github.com/repos/vipersec/DIRAC/git/commits{/sha}","comments_url":"https://api.github.com/repos/vipersec/DIRAC/comments{/number}","issue_comment_url":"https://api.github.com/repos/vipersec/DIRAC/issues/comments{/number}","contents_url":"https://api.github.com/repos/vipersec/DIRAC/contents/{+path}","compare_url":"https://api.github.com/repos/vipersec/DIRAC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vipersec/DIRAC/merges","archive_url":"https://api.github.com/repos/vipersec/DIRAC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vipersec/DIRAC/downloads","issues_url":"https://api.github.com/repos/vipersec/DIRAC/issues{/number}","pulls_url":"https://api.github.com/repos/vipersec/DIRAC/pulls{/number}","milestones_url":"https://api.github.com/repos/vipersec/DIRAC/milestones{/number}","notifications_url":"https://api.github.com/repos/vipersec/DIRAC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vipersec/DIRAC/labels{/name}","releases_url":"https://api.github.com/repos/vipersec/DIRAC/releases{/id}","deployments_url":"https://api.github.com/repos/vipersec/DIRAC/deployments","created_at":"2016-02-08T08:49:32Z","updated_at":"2016-02-08T08:49:36Z","pushed_at":"2016-04-07T07:31:52Z","git_url":"git://github.com/vipersec/DIRAC.git","ssh_url":"git@github.com:vipersec/DIRAC.git","clone_url":"https://github.com/vipersec/DIRAC.git","svn_url":"https://github.com/vipersec/DIRAC","homepage":"http://diracgrid.org","size":30824,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"integration"}},"base":{"label":"DIRACGrid:rel-v6r15","ref":"rel-v6r15","sha":"6f71c508dd0aad43ac98992cd4a9332711fce94b","user":{"login":"DIRACGrid","id":694842,"avatar_url":"https://avatars.githubusercontent.com/u/694842?v=3","gravatar_id":"","url":"https://api.github.com/users/DIRACGrid","html_url":"https://github.com/DIRACGrid","followers_url":"https://api.github.com/users/DIRACGrid/followers","following_url":"https://api.github.com/users/DIRACGrid/following{/other_user}","gists_url":"https://api.github.com/users/DIRACGrid/gists{/gist_id}","starred_url":"https://api.github.com/users/DIRACGrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIRACGrid/subscriptions","organizations_url":"https://api.github.com/users/DIRACGrid/orgs","repos_url":"https://api.github.com/users/DIRACGrid/repos","events_url":"https://api.github.com/users/DIRACGrid/events{/privacy}","received_events_url":"https://api.github.com/users/DIRACGrid/received_events","type":"Organization","site_admin":false},"repo":{"id":1576831,"name":"DIRAC","full_name":"DIRACGrid/DIRAC","owner":{"login":"DIRACGrid","id":694842,"avatar_url":"https://avatars.githubusercontent.com/u/694842?v=3","gravatar_id":"","url":"https://api.github.com/users/DIRACGrid","html_url":"https://github.com/DIRACGrid","followers_url":"https://api.github.com/users/DIRACGrid/followers","following_url":"https://api.github.com/users/DIRACGrid/following{/other_user}","gists_url":"https://api.github.com/users/DIRACGrid/gists{/gist_id}","starred_url":"https://api.github.com/users/DIRACGrid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIRACGrid/subscriptions","organizations_url":"https://api.github.com/users/DIRACGrid/orgs","repos_url":"https://api.github.com/users/DIRACGrid/repos","events_url":"https://api.github.com/users/DIRACGrid/events{/privacy}","received_events_url":"https://api.github.com/users/DIRACGrid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DIRACGrid/DIRAC","description":"DIRAC Grid","fork":false,"url":"https://api.github.com/repos/DIRACGrid/DIRAC","forks_url":"https://api.github.com/repos/DIRACGrid/DIRAC/forks","keys_url":"https://api.github.com/repos/DIRACGrid/DIRAC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DIRACGrid/DIRAC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DIRACGrid/DIRAC/teams","hooks_url":"https://api.github.com/repos/DIRACGrid/DIRAC/hooks","issue_events_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/events{/number}","events_url":"https://api.github.com/repos/DIRACGrid/DIRAC/events","assignees_url":"https://api.github.com/repos/DIRACGrid/DIRAC/assignees{/user}","branches_url":"https://api.github.com/repos/DIRACGrid/DIRAC/branches{/branch}","tags_url":"https://api.github.com/repos/DIRACGrid/DIRAC/tags","blobs_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/refs{/sha}","trees_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/{sha}","languages_url":"https://api.github.com/repos/DIRACGrid/DIRAC/languages","stargazers_url":"https://api.github.com/repos/DIRACGrid/DIRAC/stargazers","contributors_url":"https://api.github.com/repos/DIRACGrid/DIRAC/contributors","subscribers_url":"https://api.github.com/repos/DIRACGrid/DIRAC/subscribers","subscription_url":"https://api.github.com/repos/DIRACGrid/DIRAC/subscription","commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/commits{/sha}","git_commits_url":"https://api.github.com/repos/DIRACGrid/DIRAC/git/commits{/sha}","comments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/comments{/number}","issue_comment_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/comments{/number}","contents_url":"https://api.github.com/repos/DIRACGrid/DIRAC/contents/{+path}","compare_url":"https://api.github.com/repos/DIRACGrid/DIRAC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DIRACGrid/DIRAC/merges","archive_url":"https://api.github.com/repos/DIRACGrid/DIRAC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DIRACGrid/DIRAC/downloads","issues_url":"https://api.github.com/repos/DIRACGrid/DIRAC/issues{/number}","pulls_url":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls{/number}","milestones_url":"https://api.github.com/repos/DIRACGrid/DIRAC/milestones{/number}","notifications_url":"https://api.github.com/repos/DIRACGrid/DIRAC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DIRACGrid/DIRAC/labels{/name}","releases_url":"https://api.github.com/repos/DIRACGrid/DIRAC/releases{/id}","deployments_url":"https://api.github.com/repos/DIRACGrid/DIRAC/deployments","created_at":"2011-04-06T11:47:53Z","updated_at":"2016-03-09T10:17:10Z","pushed_at":"2016-04-07T07:31:54Z","git_url":"git://github.com/DIRACGrid/DIRAC.git","ssh_url":"git@github.com:DIRACGrid/DIRAC.git","clone_url":"https://github.com/DIRACGrid/DIRAC.git","svn_url":"https://github.com/DIRACGrid/DIRAC","homepage":"http://diracgrid.org","size":32519,"stargazers_count":47,"watchers_count":47,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":90,"mirror_url":null,"open_issues_count":106,"forks":90,"open_issues":106,"watchers":47,"default_branch":"integration"}},"_links":{"self":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2871"},"html":{"href":"https://github.com/DIRACGrid/DIRAC/pull/2871"},"issue":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2871"},"comments":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/issues/2871/comments"},"review_comments":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2871/comments"},"review_comment":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/pulls/2871/commits"},"statuses":{"href":"https://api.github.com/repos/DIRACGrid/DIRAC/statuses/aaa71ff215f909360d50c240144480ac93e50b65"}}}}