{"action":"created","comment":{"url":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/comments/219784842","pull_request_review_id":158038482,"id":219784842,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTc4NDg0Mg==","diff_hunk":"@@ -1176,45 +1200,48 @@ def save_scene_snapshot(self, filename):\n         :param file_name: file name\n         :type file_name: str \n         \"\"\"\n-        logging.getLogger(\"GUI\").debug(\\\n-            \"Saving scene snapshot: %s\" % filename)\n+        logging.getLogger(\"HWR\").debug(\"Saving scene snapshot: %s\" % filename)\n         try:\n             if not os.path.exists(os.path.dirname(filename)):\n                 os.makedirs(os.path.dirname(filename))\n             snapshot = self.get_scene_snapshot()\n             snapshot.save(filename)\n+            \n+            if not os.path.exists(filename):\n+                raise Exception(\"Unable to save snapshot to %s\" % filename)\n         except:\n-            logging.getLogger(\"GUI\").exception(\\\n-                 \"Unable to save scene snapshot: %s\" % filename)\n+            logging.getLogger(\"user_level_log\").error(\\\n+                 \"Unable to save snapshot: %s\" % filename)\n \n     def save_scene_animation(self, filename, duration_sec=1):\n         \"\"\"Saves animated gif of a rotating sample\"\"\"\n         \"\"\"Save animation task\"\"\"\n-        fps = 15.\n-        imgs = []\n \n-        for frame_index in range(int(duration_sec * fps)):\n-            self.save_scene_snapshot(\"%s/anim_%.04d.png\" % \\\n-                                     (self.temp_animation_dir, frame_index))\n-            self.diffractometer_hwobj.move_omega_relative(360 / (duration_sec * fps))\n-            sleep(0.001)\n+        #self.diffractometer_hwobj.set_ready(False)\n+        gevent.spawn(self.diffractometer_hwobj.move_omega_relative,\n+                     180)\n+        gevent.spawn(self.foo,\n+                     filename,\n+                     duration_sec)\n \n-       \n-        def convert_to_gif_task():\n-            process = subprocess.Popen([\"convert\",\"-delay\", \"20\", \"-loop\", \"0\",\n-                                        \"%s/anim*.png\" % self.temp_animation_dir,\n-                                        filename])\n-            #TODO implement correct waiting and file delete in the backround\n-            # like the edna characterisation thread in DataAnalysis\n- \n-            #process.wait()\n-            #for frame_index in range(duration_sec * 15):\n-            #    if os.path.exists(\"%s/anim_%.04d.png\" % \\\n-            #            (self.temp_animation_dir, frame_index)): \n-            #        os.remove(\"%s/anim_%.04d.png\" % \\\n-            #            (self.temp_animation_dir, frame_index))\n+    def foo(self, filename, duration_sec):","path":"HardwareObjects/Qt4_GraphicsManager.py","position":null,"original_position":212,"commit_id":"a97fe9521eb79313c0bfd41d3c45d37566014203","original_commit_id":"a9aa666e3e6cc3d9cdcc01a61d1b07c8fdb24876","user":{"login":"IvarsKarpics","id":7237709,"node_id":"MDQ6VXNlcjcyMzc3MDk=","avatar_url":"https://avatars2.githubusercontent.com/u/7237709?v=4","gravatar_id":"","url":"https://api.github.com/users/IvarsKarpics","html_url":"https://github.com/IvarsKarpics","followers_url":"https://api.github.com/users/IvarsKarpics/followers","following_url":"https://api.github.com/users/IvarsKarpics/following{/other_user}","gists_url":"https://api.github.com/users/IvarsKarpics/gists{/gist_id}","starred_url":"https://api.github.com/users/IvarsKarpics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvarsKarpics/subscriptions","organizations_url":"https://api.github.com/users/IvarsKarpics/orgs","repos_url":"https://api.github.com/users/IvarsKarpics/repos","events_url":"https://api.github.com/users/IvarsKarpics/events{/privacy}","received_events_url":"https://api.github.com/users/IvarsKarpics/received_events","type":"User","site_admin":false},"body":"I changed the method name. If its fine you can merge the PR","created_at":"2018-09-24T10:05:22Z","updated_at":"2018-09-24T10:05:22Z","html_url":"https://github.com/mxcube/HardwareRepository/pull/215#discussion_r219784842","pull_request_url":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/215","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/comments/219784842"},"html":{"href":"https://github.com/mxcube/HardwareRepository/pull/215#discussion_r219784842"},"pull_request":{"href":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/215"}},"in_reply_to_id":219783096},"pull_request":{"url":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/215","id":217600092,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NjAwMDky","html_url":"https://github.com/mxcube/HardwareRepository/pull/215","diff_url":"https://github.com/mxcube/HardwareRepository/pull/215.diff","patch_url":"https://github.com/mxcube/HardwareRepository/pull/215.patch","issue_url":"https://api.github.com/repos/mxcube/HardwareRepository/issues/215","number":215,"state":"open","locked":false,"title":"[master] Qt graphics","user":{"login":"IvarsKarpics","id":7237709,"node_id":"MDQ6VXNlcjcyMzc3MDk=","avatar_url":"https://avatars2.githubusercontent.com/u/7237709?v=4","gravatar_id":"","url":"https://api.github.com/users/IvarsKarpics","html_url":"https://github.com/IvarsKarpics","followers_url":"https://api.github.com/users/IvarsKarpics/followers","following_url":"https://api.github.com/users/IvarsKarpics/following{/other_user}","gists_url":"https://api.github.com/users/IvarsKarpics/gists{/gist_id}","starred_url":"https://api.github.com/users/IvarsKarpics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvarsKarpics/subscriptions","organizations_url":"https://api.github.com/users/IvarsKarpics/orgs","repos_url":"https://api.github.com/users/IvarsKarpics/repos","events_url":"https://api.github.com/users/IvarsKarpics/events{/privacy}","received_events_url":"https://api.github.com/users/IvarsKarpics/received_events","type":"User","site_admin":false},"body":"Some bug fixes and new features","created_at":"2018-09-24T09:37:49Z","updated_at":"2018-09-24T10:05:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8777a2a88d8f9f70d056db9264fc8b2ea7c6627d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/215/commits","review_comments_url":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/215/comments","review_comment_url":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mxcube/HardwareRepository/issues/215/comments","statuses_url":"https://api.github.com/repos/mxcube/HardwareRepository/statuses/a97fe9521eb79313c0bfd41d3c45d37566014203","head":{"label":"mxcube:qt_graphics","ref":"qt_graphics","sha":"a97fe9521eb79313c0bfd41d3c45d37566014203","user":{"login":"mxcube","id":4322027,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMjIwMjc=","avatar_url":"https://avatars2.githubusercontent.com/u/4322027?v=4","gravatar_id":"","url":"https://api.github.com/users/mxcube","html_url":"https://github.com/mxcube","followers_url":"https://api.github.com/users/mxcube/followers","following_url":"https://api.github.com/users/mxcube/following{/other_user}","gists_url":"https://api.github.com/users/mxcube/gists{/gist_id}","starred_url":"https://api.github.com/users/mxcube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxcube/subscriptions","organizations_url":"https://api.github.com/users/mxcube/orgs","repos_url":"https://api.github.com/users/mxcube/repos","events_url":"https://api.github.com/users/mxcube/events{/privacy}","received_events_url":"https://api.github.com/users/mxcube/received_events","type":"Organization","site_admin":false},"repo":{"id":9835063,"node_id":"MDEwOlJlcG9zaXRvcnk5ODM1MDYz","name":"HardwareRepository","full_name":"mxcube/HardwareRepository","private":false,"owner":{"login":"mxcube","id":4322027,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMjIwMjc=","avatar_url":"https://avatars2.githubusercontent.com/u/4322027?v=4","gravatar_id":"","url":"https://api.github.com/users/mxcube","html_url":"https://github.com/mxcube","followers_url":"https://api.github.com/users/mxcube/followers","following_url":"https://api.github.com/users/mxcube/following{/other_user}","gists_url":"https://api.github.com/users/mxcube/gists{/gist_id}","starred_url":"https://api.github.com/users/mxcube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxcube/subscriptions","organizations_url":"https://api.github.com/users/mxcube/orgs","repos_url":"https://api.github.com/users/mxcube/repos","events_url":"https://api.github.com/users/mxcube/events{/privacy}","received_events_url":"https://api.github.com/users/mxcube/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mxcube/HardwareRepository","description":"Back-end level of MXCuBE","fork":false,"url":"https://api.github.com/repos/mxcube/HardwareRepository","forks_url":"https://api.github.com/repos/mxcube/HardwareRepository/forks","keys_url":"https://api.github.com/repos/mxcube/HardwareRepository/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mxcube/HardwareRepository/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mxcube/HardwareRepository/teams","hooks_url":"https://api.github.com/repos/mxcube/HardwareRepository/hooks","issue_events_url":"https://api.github.com/repos/mxcube/HardwareRepository/issues/events{/number}","events_url":"https://api.github.com/repos/mxcube/HardwareRepository/events","assignees_url":"https://api.github.com/repos/mxcube/HardwareRepository/assignees{/user}","branches_url":"https://api.github.com/repos/mxcube/HardwareRepository/branches{/branch}","tags_url":"https://api.github.com/repos/mxcube/HardwareRepository/tags","blobs_url":"https://api.github.com/repos/mxcube/HardwareRepository/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mxcube/HardwareRepository/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mxcube/HardwareRepository/git/refs{/sha}","trees_url":"https://api.github.com/repos/mxcube/HardwareRepository/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mxcube/HardwareRepository/statuses/{sha}","languages_url":"https://api.github.com/repos/mxcube/HardwareRepository/languages","stargazers_url":"https://api.github.com/repos/mxcube/HardwareRepository/stargazers","contributors_url":"https://api.github.com/repos/mxcube/HardwareRepository/contributors","subscribers_url":"https://api.github.com/repos/mxcube/HardwareRepository/subscribers","subscription_url":"https://api.github.com/repos/mxcube/HardwareRepository/subscription","commits_url":"https://api.github.com/repos/mxcube/HardwareRepository/commits{/sha}","git_commits_url":"https://api.github.com/repos/mxcube/HardwareRepository/git/commits{/sha}","comments_url":"https://api.github.com/repos/mxcube/HardwareRepository/comments{/number}","issue_comment_url":"https://api.github.com/repos/mxcube/HardwareRepository/issues/comments{/number}","contents_url":"https://api.github.com/repos/mxcube/HardwareRepository/contents/{+path}","compare_url":"https://api.github.com/repos/mxcube/HardwareRepository/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mxcube/HardwareRepository/merges","archive_url":"https://api.github.com/repos/mxcube/HardwareRepository/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mxcube/HardwareRepository/downloads","issues_url":"https://api.github.com/repos/mxcube/HardwareRepository/issues{/number}","pulls_url":"https://api.github.com/repos/mxcube/HardwareRepository/pulls{/number}","milestones_url":"https://api.github.com/repos/mxcube/HardwareRepository/milestones{/number}","notifications_url":"https://api.github.com/repos/mxcube/HardwareRepository/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mxcube/HardwareRepository/labels{/name}","releases_url":"https://api.github.com/repos/mxcube/HardwareRepository/releases{/id}","deployments_url":"https://api.github.com/repos/mxcube/HardwareRepository/deployments","created_at":"2013-05-03T11:57:41Z","updated_at":"2018-09-24T08:35:29Z","pushed_at":"2018-09-24T10:04:43Z","git_url":"git://github.com/mxcube/HardwareRepository.git","ssh_url":"git@github.com:mxcube/HardwareRepository.git","clone_url":"https://github.com/mxcube/HardwareRepository.git","svn_url":"https://github.com/mxcube/HardwareRepository","homepage":"","size":22390,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":21,"open_issues":10,"watchers":0,"default_branch":"master"}},"base":{"label":"mxcube:master","ref":"master","sha":"6df87199259fef136a0f5bdf86927c719412b964","user":{"login":"mxcube","id":4322027,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMjIwMjc=","avatar_url":"https://avatars2.githubusercontent.com/u/4322027?v=4","gravatar_id":"","url":"https://api.github.com/users/mxcube","html_url":"https://github.com/mxcube","followers_url":"https://api.github.com/users/mxcube/followers","following_url":"https://api.github.com/users/mxcube/following{/other_user}","gists_url":"https://api.github.com/users/mxcube/gists{/gist_id}","starred_url":"https://api.github.com/users/mxcube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxcube/subscriptions","organizations_url":"https://api.github.com/users/mxcube/orgs","repos_url":"https://api.github.com/users/mxcube/repos","events_url":"https://api.github.com/users/mxcube/events{/privacy}","received_events_url":"https://api.github.com/users/mxcube/received_events","type":"Organization","site_admin":false},"repo":{"id":9835063,"node_id":"MDEwOlJlcG9zaXRvcnk5ODM1MDYz","name":"HardwareRepository","full_name":"mxcube/HardwareRepository","private":false,"owner":{"login":"mxcube","id":4322027,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMjIwMjc=","avatar_url":"https://avatars2.githubusercontent.com/u/4322027?v=4","gravatar_id":"","url":"https://api.github.com/users/mxcube","html_url":"https://github.com/mxcube","followers_url":"https://api.github.com/users/mxcube/followers","following_url":"https://api.github.com/users/mxcube/following{/other_user}","gists_url":"https://api.github.com/users/mxcube/gists{/gist_id}","starred_url":"https://api.github.com/users/mxcube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxcube/subscriptions","organizations_url":"https://api.github.com/users/mxcube/orgs","repos_url":"https://api.github.com/users/mxcube/repos","events_url":"https://api.github.com/users/mxcube/events{/privacy}","received_events_url":"https://api.github.com/users/mxcube/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mxcube/HardwareRepository","description":"Back-end level of MXCuBE","fork":false,"url":"https://api.github.com/repos/mxcube/HardwareRepository","forks_url":"https://api.github.com/repos/mxcube/HardwareRepository/forks","keys_url":"https://api.github.com/repos/mxcube/HardwareRepository/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mxcube/HardwareRepository/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mxcube/HardwareRepository/teams","hooks_url":"https://api.github.com/repos/mxcube/HardwareRepository/hooks","issue_events_url":"https://api.github.com/repos/mxcube/HardwareRepository/issues/events{/number}","events_url":"https://api.github.com/repos/mxcube/HardwareRepository/events","assignees_url":"https://api.github.com/repos/mxcube/HardwareRepository/assignees{/user}","branches_url":"https://api.github.com/repos/mxcube/HardwareRepository/branches{/branch}","tags_url":"https://api.github.com/repos/mxcube/HardwareRepository/tags","blobs_url":"https://api.github.com/repos/mxcube/HardwareRepository/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mxcube/HardwareRepository/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mxcube/HardwareRepository/git/refs{/sha}","trees_url":"https://api.github.com/repos/mxcube/HardwareRepository/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mxcube/HardwareRepository/statuses/{sha}","languages_url":"https://api.github.com/repos/mxcube/HardwareRepository/languages","stargazers_url":"https://api.github.com/repos/mxcube/HardwareRepository/stargazers","contributors_url":"https://api.github.com/repos/mxcube/HardwareRepository/contributors","subscribers_url":"https://api.github.com/repos/mxcube/HardwareRepository/subscribers","subscription_url":"https://api.github.com/repos/mxcube/HardwareRepository/subscription","commits_url":"https://api.github.com/repos/mxcube/HardwareRepository/commits{/sha}","git_commits_url":"https://api.github.com/repos/mxcube/HardwareRepository/git/commits{/sha}","comments_url":"https://api.github.com/repos/mxcube/HardwareRepository/comments{/number}","issue_comment_url":"https://api.github.com/repos/mxcube/HardwareRepository/issues/comments{/number}","contents_url":"https://api.github.com/repos/mxcube/HardwareRepository/contents/{+path}","compare_url":"https://api.github.com/repos/mxcube/HardwareRepository/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mxcube/HardwareRepository/merges","archive_url":"https://api.github.com/repos/mxcube/HardwareRepository/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mxcube/HardwareRepository/downloads","issues_url":"https://api.github.com/repos/mxcube/HardwareRepository/issues{/number}","pulls_url":"https://api.github.com/repos/mxcube/HardwareRepository/pulls{/number}","milestones_url":"https://api.github.com/repos/mxcube/HardwareRepository/milestones{/number}","notifications_url":"https://api.github.com/repos/mxcube/HardwareRepository/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mxcube/HardwareRepository/labels{/name}","releases_url":"https://api.github.com/repos/mxcube/HardwareRepository/releases{/id}","deployments_url":"https://api.github.com/repos/mxcube/HardwareRepository/deployments","created_at":"2013-05-03T11:57:41Z","updated_at":"2018-09-24T08:35:29Z","pushed_at":"2018-09-24T10:04:43Z","git_url":"git://github.com/mxcube/HardwareRepository.git","ssh_url":"git@github.com:mxcube/HardwareRepository.git","clone_url":"https://github.com/mxcube/HardwareRepository.git","svn_url":"https://github.com/mxcube/HardwareRepository","homepage":"","size":22390,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":21,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/215"},"html":{"href":"https://github.com/mxcube/HardwareRepository/pull/215"},"issue":{"href":"https://api.github.com/repos/mxcube/HardwareRepository/issues/215"},"comments":{"href":"https://api.github.com/repos/mxcube/HardwareRepository/issues/215/comments"},"review_comments":{"href":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/215/comments"},"review_comment":{"href":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mxcube/HardwareRepository/pulls/215/commits"},"statuses":{"href":"https://api.github.com/repos/mxcube/HardwareRepository/statuses/a97fe9521eb79313c0bfd41d3c45d37566014203"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"IvarsKarpics"}}