{"action":"created","comment":{"url":"https://api.github.com/repos/golemfactory/concent/pulls/comments/182598441","pull_request_review_id":113426463,"id":182598441,"diff_hunk":"@@ -0,0 +1,90 @@\n+from django.core.validators import ValidationError\n+from django.db.models       import CharField\n+from django.db.models       import DateTimeField\n+from django.db.models       import ForeignKey\n+from django.db.models       import Model\n+from django.db.models       import OneToOneField\n+from django.utils           import timezone\n+\n+from core.constants         import MESSAGE_TASK_ID_MAX_LENGTH\n+from utils.fields           import ChoiceEnum\n+from .constants             import MESSAGE_PATH_LENGTH\n+\n+\n+class VerificationRequest(Model):\n+\n+    subtask_id = CharField(max_length = MESSAGE_TASK_ID_MAX_LENGTH)\n+\n+    # Relative path of the .zip file that contains Blender source files for the render.\n+    source_package_path = CharField(max_length=255, unique=True)\n+\n+    # Relative path of the .zip file that contains the rendering result received from the provider.\n+    result_package_path = CharField(max_length=255, unique=True)\n+\n+    def clean(self):\n+        super().clean()\n+\n+        # source_package_path cannot be used as result_package_path in any model instance.\n+        if VerificationRequest.objects.filter(result_package_path=self.source_package_path).exists():\n+            raise ValidationError({\n+                'source_package_path': 'source_package_path cannot be used as result_package_path in any other VerificationRequest.'\n+            })\n+\n+        # result_package_path cannot be used as source_package_path in any model instance.\n+        if VerificationRequest.objects.filter(source_package_path=self.result_package_path).exists():\n+            raise ValidationError({\n+                'result_package_path': 'result_package_path cannot be used as source_package_path in any other VerificationRequest.'\n+            })\n+\n+\n+class BlenderSubtaskDefinition(Model):\n+    \"\"\"\n+    For each VerificationRequest there must be exactly one BlenderSubtaskDefinition in the database.\n+    \"\"\"\n+\n+    class OutputFormat(ChoiceEnum):\n+        JPG = 'jpg'\n+        JPEG = 'jpeg'\n+        BMP = 'bmp'\n+        SGI = 'sgi'\n+        RGB = 'rgb'\n+        BW = 'bw'\n+        PNG = 'PNG'\n+        JP2 = 'jp2'\n+        JP2C = 'jp2c'\n+        TGA = 'tga'\n+        CIN = 'cin'\n+        DPX = 'dpx'\n+        HDR = 'hdr'\n+        TIF = 'tif'\n+        TIFF = 'tiff'\n+\n+    # Foreign key to VerificationRequest. Can't be NULL and must be unique.\n+    verification_request = OneToOneField(VerificationRequest, unique=True, related_name='blender_subtask_definition')\n+\n+    # Type of the output image to be produced by Blender. This determines the file extensions.\n+    # Only formats supported by Blender should be allowed here.\n+    # This value is passed to Blender using the -F command-line option.\n+    output_format = CharField(max_length=32, choices=OutputFormat.choices())\n+\n+    # Relative path to the .blend file inside the source package.\n+    scene_file = CharField(max_length=MESSAGE_PATH_LENGTH)\n+\n+    # Indicates when Conductor has received the request.\n+    created_at = DateTimeField(default=timezone.now)\n+\n+\n+class UploadReport(Model):\n+    \"\"\"\n+    Existence of this object indicates that a file has been uploaded to nginx-storage\n+    and nginx notified Conductor about this fact.\n+    \"\"\"\n+\n+    # Relative path of the file. Relative to the same directory that paths listed in FileTransferTokens are relative to.\n+    path = CharField(max_length=MESSAGE_PATH_LENGTH)\n+\n+    # Foreign key to VerificationRequest. Can be NULL if there's no corresponding request.\n+    verification_request = ForeignKey(VerificationRequest, related_name = 'upload_reports', blank=True, null=True)\n+\n+    # Indicates when conductor has been notified about the upload.\n+    created_at      = DateTimeField(default = timezone.now)","path":"concent_api/conductor/models.py","position":null,"original_position":90,"commit_id":"f8a9e1cb5daf05baa8df44589155058283b3d64d","original_commit_id":"b7d4319463413993fe6062d0aa2d60725d290727","user":{"login":"rwrzesien","id":10088909,"avatar_url":"https://avatars0.githubusercontent.com/u/10088909?v=4","gravatar_id":"","url":"https://api.github.com/users/rwrzesien","html_url":"https://github.com/rwrzesien","followers_url":"https://api.github.com/users/rwrzesien/followers","following_url":"https://api.github.com/users/rwrzesien/following{/other_user}","gists_url":"https://api.github.com/users/rwrzesien/gists{/gist_id}","starred_url":"https://api.github.com/users/rwrzesien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwrzesien/subscriptions","organizations_url":"https://api.github.com/users/rwrzesien/orgs","repos_url":"https://api.github.com/users/rwrzesien/repos","events_url":"https://api.github.com/users/rwrzesien/events{/privacy}","received_events_url":"https://api.github.com/users/rwrzesien/received_events","type":"User","site_admin":false},"body":"@Jakub89 All should be updated by now.","created_at":"2018-04-18T23:31:27Z","updated_at":"2018-04-18T23:31:27Z","html_url":"https://github.com/golemfactory/concent/pull/268#discussion_r182598441","pull_request_url":"https://api.github.com/repos/golemfactory/concent/pulls/268","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/comments/182598441"},"html":{"href":"https://github.com/golemfactory/concent/pull/268#discussion_r182598441"},"pull_request":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/268"}},"in_reply_to_id":182407898},"pull_request":{"url":"https://api.github.com/repos/golemfactory/concent/pulls/268","id":181161883,"html_url":"https://github.com/golemfactory/concent/pull/268","diff_url":"https://github.com/golemfactory/concent/pull/268.diff","patch_url":"https://github.com/golemfactory/concent/pull/268.patch","issue_url":"https://api.github.com/repos/golemfactory/concent/issues/268","number":268,"state":"open","locked":false,"title":"Feature verification conductor app and database configuration on storage cluster","user":{"login":"rwrzesien","id":10088909,"avatar_url":"https://avatars0.githubusercontent.com/u/10088909?v=4","gravatar_id":"","url":"https://api.github.com/users/rwrzesien","html_url":"https://github.com/rwrzesien","followers_url":"https://api.github.com/users/rwrzesien/followers","following_url":"https://api.github.com/users/rwrzesien/following{/other_user}","gists_url":"https://api.github.com/users/rwrzesien/gists{/gist_id}","starred_url":"https://api.github.com/users/rwrzesien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwrzesien/subscriptions","organizations_url":"https://api.github.com/users/rwrzesien/orgs","repos_url":"https://api.github.com/users/rwrzesien/repos","events_url":"https://api.github.com/users/rwrzesien/events{/privacy}","received_events_url":"https://api.github.com/users/rwrzesien/received_events","type":"User","site_admin":false},"body":"Resolves https://github.com/golemfactory/concent/issues/207.\r\n\r\nWas a part of https://github.com/golemfactory/concent/pull/217","created_at":"2018-04-12T10:46:25Z","updated_at":"2018-04-18T23:31:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a91ba781fef6867058b989945a5fb183bbf97701","assignee":null,"assignees":[],"requested_reviewers":[{"login":"cameel","id":137030,"avatar_url":"https://avatars3.githubusercontent.com/u/137030?v=4","gravatar_id":"","url":"https://api.github.com/users/cameel","html_url":"https://github.com/cameel","followers_url":"https://api.github.com/users/cameel/followers","following_url":"https://api.github.com/users/cameel/following{/other_user}","gists_url":"https://api.github.com/users/cameel/gists{/gist_id}","starred_url":"https://api.github.com/users/cameel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cameel/subscriptions","organizations_url":"https://api.github.com/users/cameel/orgs","repos_url":"https://api.github.com/users/cameel/repos","events_url":"https://api.github.com/users/cameel/events{/privacy}","received_events_url":"https://api.github.com/users/cameel/received_events","type":"User","site_admin":false},{"login":"kbeker","id":26469852,"avatar_url":"https://avatars3.githubusercontent.com/u/26469852?v=4","gravatar_id":"","url":"https://api.github.com/users/kbeker","html_url":"https://github.com/kbeker","followers_url":"https://api.github.com/users/kbeker/followers","following_url":"https://api.github.com/users/kbeker/following{/other_user}","gists_url":"https://api.github.com/users/kbeker/gists{/gist_id}","starred_url":"https://api.github.com/users/kbeker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbeker/subscriptions","organizations_url":"https://api.github.com/users/kbeker/orgs","repos_url":"https://api.github.com/users/kbeker/repos","events_url":"https://api.github.com/users/kbeker/events{/privacy}","received_events_url":"https://api.github.com/users/kbeker/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/golemfactory/concent/pulls/268/commits","review_comments_url":"https://api.github.com/repos/golemfactory/concent/pulls/268/comments","review_comment_url":"https://api.github.com/repos/golemfactory/concent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/golemfactory/concent/issues/268/comments","statuses_url":"https://api.github.com/repos/golemfactory/concent/statuses/f8a9e1cb5daf05baa8df44589155058283b3d64d","head":{"label":"golemfactory:feature-verification-conductor-app-and-database-configuration-on-storage-cluster","ref":"feature-verification-conductor-app-and-database-configuration-on-storage-cluster","sha":"f8a9e1cb5daf05baa8df44589155058283b3d64d","user":{"login":"golemfactory","id":23193179,"avatar_url":"https://avatars1.githubusercontent.com/u/23193179?v=4","gravatar_id":"","url":"https://api.github.com/users/golemfactory","html_url":"https://github.com/golemfactory","followers_url":"https://api.github.com/users/golemfactory/followers","following_url":"https://api.github.com/users/golemfactory/following{/other_user}","gists_url":"https://api.github.com/users/golemfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/golemfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golemfactory/subscriptions","organizations_url":"https://api.github.com/users/golemfactory/orgs","repos_url":"https://api.github.com/users/golemfactory/repos","events_url":"https://api.github.com/users/golemfactory/events{/privacy}","received_events_url":"https://api.github.com/users/golemfactory/received_events","type":"Organization","site_admin":false},"repo":{"id":108836885,"name":"concent","full_name":"golemfactory/concent","owner":{"login":"golemfactory","id":23193179,"avatar_url":"https://avatars1.githubusercontent.com/u/23193179?v=4","gravatar_id":"","url":"https://api.github.com/users/golemfactory","html_url":"https://github.com/golemfactory","followers_url":"https://api.github.com/users/golemfactory/followers","following_url":"https://api.github.com/users/golemfactory/following{/other_user}","gists_url":"https://api.github.com/users/golemfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/golemfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golemfactory/subscriptions","organizations_url":"https://api.github.com/users/golemfactory/orgs","repos_url":"https://api.github.com/users/golemfactory/repos","events_url":"https://api.github.com/users/golemfactory/events{/privacy}","received_events_url":"https://api.github.com/users/golemfactory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/golemfactory/concent","description":"Repository for Concent Service sources","fork":false,"url":"https://api.github.com/repos/golemfactory/concent","forks_url":"https://api.github.com/repos/golemfactory/concent/forks","keys_url":"https://api.github.com/repos/golemfactory/concent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/golemfactory/concent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/golemfactory/concent/teams","hooks_url":"https://api.github.com/repos/golemfactory/concent/hooks","issue_events_url":"https://api.github.com/repos/golemfactory/concent/issues/events{/number}","events_url":"https://api.github.com/repos/golemfactory/concent/events","assignees_url":"https://api.github.com/repos/golemfactory/concent/assignees{/user}","branches_url":"https://api.github.com/repos/golemfactory/concent/branches{/branch}","tags_url":"https://api.github.com/repos/golemfactory/concent/tags","blobs_url":"https://api.github.com/repos/golemfactory/concent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/golemfactory/concent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/golemfactory/concent/git/refs{/sha}","trees_url":"https://api.github.com/repos/golemfactory/concent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/golemfactory/concent/statuses/{sha}","languages_url":"https://api.github.com/repos/golemfactory/concent/languages","stargazers_url":"https://api.github.com/repos/golemfactory/concent/stargazers","contributors_url":"https://api.github.com/repos/golemfactory/concent/contributors","subscribers_url":"https://api.github.com/repos/golemfactory/concent/subscribers","subscription_url":"https://api.github.com/repos/golemfactory/concent/subscription","commits_url":"https://api.github.com/repos/golemfactory/concent/commits{/sha}","git_commits_url":"https://api.github.com/repos/golemfactory/concent/git/commits{/sha}","comments_url":"https://api.github.com/repos/golemfactory/concent/comments{/number}","issue_comment_url":"https://api.github.com/repos/golemfactory/concent/issues/comments{/number}","contents_url":"https://api.github.com/repos/golemfactory/concent/contents/{+path}","compare_url":"https://api.github.com/repos/golemfactory/concent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/golemfactory/concent/merges","archive_url":"https://api.github.com/repos/golemfactory/concent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/golemfactory/concent/downloads","issues_url":"https://api.github.com/repos/golemfactory/concent/issues{/number}","pulls_url":"https://api.github.com/repos/golemfactory/concent/pulls{/number}","milestones_url":"https://api.github.com/repos/golemfactory/concent/milestones{/number}","notifications_url":"https://api.github.com/repos/golemfactory/concent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/golemfactory/concent/labels{/name}","releases_url":"https://api.github.com/repos/golemfactory/concent/releases{/id}","deployments_url":"https://api.github.com/repos/golemfactory/concent/deployments","created_at":"2017-10-30T10:41:44Z","updated_at":"2018-04-18T14:35:30Z","pushed_at":"2018-04-18T23:30:20Z","git_url":"git://github.com/golemfactory/concent.git","ssh_url":"git@github.com:golemfactory/concent.git","clone_url":"https://github.com/golemfactory/concent.git","svn_url":"https://github.com/golemfactory/concent","homepage":null,"size":1066,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":85,"license":null,"forks":0,"open_issues":85,"watchers":2,"default_branch":"master"}},"base":{"label":"golemfactory:master","ref":"master","sha":"4093fc09d9fccc2daac46d953916f33708c41888","user":{"login":"golemfactory","id":23193179,"avatar_url":"https://avatars1.githubusercontent.com/u/23193179?v=4","gravatar_id":"","url":"https://api.github.com/users/golemfactory","html_url":"https://github.com/golemfactory","followers_url":"https://api.github.com/users/golemfactory/followers","following_url":"https://api.github.com/users/golemfactory/following{/other_user}","gists_url":"https://api.github.com/users/golemfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/golemfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golemfactory/subscriptions","organizations_url":"https://api.github.com/users/golemfactory/orgs","repos_url":"https://api.github.com/users/golemfactory/repos","events_url":"https://api.github.com/users/golemfactory/events{/privacy}","received_events_url":"https://api.github.com/users/golemfactory/received_events","type":"Organization","site_admin":false},"repo":{"id":108836885,"name":"concent","full_name":"golemfactory/concent","owner":{"login":"golemfactory","id":23193179,"avatar_url":"https://avatars1.githubusercontent.com/u/23193179?v=4","gravatar_id":"","url":"https://api.github.com/users/golemfactory","html_url":"https://github.com/golemfactory","followers_url":"https://api.github.com/users/golemfactory/followers","following_url":"https://api.github.com/users/golemfactory/following{/other_user}","gists_url":"https://api.github.com/users/golemfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/golemfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golemfactory/subscriptions","organizations_url":"https://api.github.com/users/golemfactory/orgs","repos_url":"https://api.github.com/users/golemfactory/repos","events_url":"https://api.github.com/users/golemfactory/events{/privacy}","received_events_url":"https://api.github.com/users/golemfactory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/golemfactory/concent","description":"Repository for Concent Service sources","fork":false,"url":"https://api.github.com/repos/golemfactory/concent","forks_url":"https://api.github.com/repos/golemfactory/concent/forks","keys_url":"https://api.github.com/repos/golemfactory/concent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/golemfactory/concent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/golemfactory/concent/teams","hooks_url":"https://api.github.com/repos/golemfactory/concent/hooks","issue_events_url":"https://api.github.com/repos/golemfactory/concent/issues/events{/number}","events_url":"https://api.github.com/repos/golemfactory/concent/events","assignees_url":"https://api.github.com/repos/golemfactory/concent/assignees{/user}","branches_url":"https://api.github.com/repos/golemfactory/concent/branches{/branch}","tags_url":"https://api.github.com/repos/golemfactory/concent/tags","blobs_url":"https://api.github.com/repos/golemfactory/concent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/golemfactory/concent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/golemfactory/concent/git/refs{/sha}","trees_url":"https://api.github.com/repos/golemfactory/concent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/golemfactory/concent/statuses/{sha}","languages_url":"https://api.github.com/repos/golemfactory/concent/languages","stargazers_url":"https://api.github.com/repos/golemfactory/concent/stargazers","contributors_url":"https://api.github.com/repos/golemfactory/concent/contributors","subscribers_url":"https://api.github.com/repos/golemfactory/concent/subscribers","subscription_url":"https://api.github.com/repos/golemfactory/concent/subscription","commits_url":"https://api.github.com/repos/golemfactory/concent/commits{/sha}","git_commits_url":"https://api.github.com/repos/golemfactory/concent/git/commits{/sha}","comments_url":"https://api.github.com/repos/golemfactory/concent/comments{/number}","issue_comment_url":"https://api.github.com/repos/golemfactory/concent/issues/comments{/number}","contents_url":"https://api.github.com/repos/golemfactory/concent/contents/{+path}","compare_url":"https://api.github.com/repos/golemfactory/concent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/golemfactory/concent/merges","archive_url":"https://api.github.com/repos/golemfactory/concent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/golemfactory/concent/downloads","issues_url":"https://api.github.com/repos/golemfactory/concent/issues{/number}","pulls_url":"https://api.github.com/repos/golemfactory/concent/pulls{/number}","milestones_url":"https://api.github.com/repos/golemfactory/concent/milestones{/number}","notifications_url":"https://api.github.com/repos/golemfactory/concent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/golemfactory/concent/labels{/name}","releases_url":"https://api.github.com/repos/golemfactory/concent/releases{/id}","deployments_url":"https://api.github.com/repos/golemfactory/concent/deployments","created_at":"2017-10-30T10:41:44Z","updated_at":"2018-04-18T14:35:30Z","pushed_at":"2018-04-18T23:30:20Z","git_url":"git://github.com/golemfactory/concent.git","ssh_url":"git@github.com:golemfactory/concent.git","clone_url":"https://github.com/golemfactory/concent.git","svn_url":"https://github.com/golemfactory/concent","homepage":null,"size":1066,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":85,"license":null,"forks":0,"open_issues":85,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/268"},"html":{"href":"https://github.com/golemfactory/concent/pull/268"},"issue":{"href":"https://api.github.com/repos/golemfactory/concent/issues/268"},"comments":{"href":"https://api.github.com/repos/golemfactory/concent/issues/268/comments"},"review_comments":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/268/comments"},"review_comment":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/268/commits"},"statuses":{"href":"https://api.github.com/repos/golemfactory/concent/statuses/f8a9e1cb5daf05baa8df44589155058283b3d64d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"rwrzesien"}}